go-gh 2.0.0
What's Changed
This is a fairly large release with a couple new features and a bunch of tech debt cleanup for go-gh
.
As part of keeping this library maintainable and inline with best Go practices we have made breaking changes to a couple of the packages thus constituting a bump of the major version to v2.0.0.
Below are the listed changes ordered by package as well as migration guidelines when applicable.
gh
package
- Move
CurrentRepository
function from top levelgh
package torepository
package.- To migrate:
gh.CurrentRepository
->repository.Current
- To migrate:
- Move
RESTClient
function from top levelgh
package toapi
package.- To migrate:
gh.RESTClient
->api.DefaultRESTClient
orapi.NewRESTClient
- To migrate:
- Move
GQLClient
function from top levelgh
package toapi
package.- To migrate:
gh.GQlClient
->api.DefaultGraphQLClient
orapi.NewGraphQLClient
- To migrate:
- Move
HTTPClient
function from top levelgh
package toapi
package.- To migrate:
gh.HTTPClient
->api.DefaultHTTPClient
orapi.NewHTTPClient
- To migrate:
- Add
ExecInteractive
by @stemar94 in #115 - Add
ExecContext
function by @mislav in #115 - Add support for
GH_PATH
environment variable toExec
functions by @mislav in #115
api
package
- Change references of
GQL
toGraphQL
.- To migrate:
api.GQLError
->api.GraphQLError
- To migrate:
api.GQLErrorItem
->api.GraphQLErrorItem
- To migrate:
- Change
ClientOptions
to be used with value semantics instead of pointer semantics.- This allows
ClientOptions
to be used with multiple clients without having to worry about them being modified.
- This allows
- Added
DefaultRESTClient
,DefaultHTTPClient
,DefaultGraphQLClient
convenience factory functions. - Change
RESTClient
interface type to a concrete type. - Change
GraphQLClient
interface type to a concrete type. - Change methods on
HTTPError
andGraphQLError
custom error types to take pointers as method receivers. - Change
GraphQLClient
Query
andMutate
methods to returnGraphQLError
instead ofshurcooL/graphql.Errors
.
browser
package
- Change
New
factory function to return*Browser
instead ofBrowser
.
config
package
- Change methods on
InvalidConfigFileError
andKeyNotFoundError
custom error types to take pointers as method receivers.
jq
package
- Add
EvaluateFormatted
function to pretty print JSON output by @mjpieters in #116
repository
package
- Change
Repository
interface type to a concrete type.
ssh
package
template
package
- Change
New
factory function to return*Template
instead ofTemplate
.
Other changes
New Contributors
- @mjpieters made their first contribution in #116
- @stemar94 made their first contribution in #115
Full Changelog: v1.2.1...v2.0.0