Skip to content

Commit

Permalink
Gopkg.toml,github: update rest dependency
Browse files Browse the repository at this point in the history
This removes a lot of the imports that the rest package previously
depended on that we actually don't need.

Fixes #110.
  • Loading branch information
kevinburke committed Jan 6, 2021
1 parent 3e282b5 commit e17f7ae
Show file tree
Hide file tree
Showing 369 changed files with 62 additions and 166,575 deletions.
56 changes: 8 additions & 48 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[[constraint]]
name = "github.com/kevinburke/rest"
version = "2.2.0"
version = "2.5.0"

[[constraint]]
name = "github.com/tomnomnom/linkheader"
Expand Down
12 changes: 6 additions & 6 deletions github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
"reflect"

"github.com/kevinburke/rest"
"github.com/kevinburke/rest/restclient"
"github.com/tomnomnom/linkheader"
)

Expand Down Expand Up @@ -42,14 +42,14 @@ func DoAuthRequest(method, url, mime, token string, headers map[string]string, b
// API, such as authorization tokens. Methods called on Client will supply
// these options when calling the API.
type Client struct {
client *rest.Client
client *restclient.Client
}

// NewClient creates a new Client for use with the Github API.
func NewClient(username, token string, client *rest.Client) Client {
func NewClient(username, token string, client *restclient.Client) Client {
c := Client{}
if client == nil {
c.client = rest.NewClient(username, token, DefaultBaseURL)
c.client = restclient.New(username, token, DefaultBaseURL)
} else {
c.client = client
}
Expand Down Expand Up @@ -153,7 +153,7 @@ var defaultHttpClient *http.Client

func init() {
defaultHttpClient = &http.Client{
Transport: rest.DefaultTransport,
Transport: restclient.DefaultTransport,
}
}

Expand All @@ -176,7 +176,7 @@ func (c Client) Do(r *http.Request) (*http.Response, error) {
if c.client.ErrorParser != nil {
return nil, c.client.ErrorParser(res)
}
return nil, rest.DefaultErrorParser(res)
return nil, restclient.DefaultErrorParser(res)
}
return res, nil
}
Expand Down
15 changes: 0 additions & 15 deletions vendor/github.com/go-stack/stack/.travis.yml

This file was deleted.

21 changes: 0 additions & 21 deletions vendor/github.com/go-stack/stack/LICENSE.md

This file was deleted.

38 changes: 0 additions & 38 deletions vendor/github.com/go-stack/stack/README.md

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/go-stack/stack/go.mod

This file was deleted.

Loading

0 comments on commit e17f7ae

Please sign in to comment.