diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2017-04-10 21:18:42 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2017-04-10 21:38:33 +0100 |
commit | 30802e07b2d84fbc213b490d3402707dffe60096 (patch) | |
tree | 934aecb8f3582325dfd1aa6652193adac87d00db /vendor/github.com/google/go-github/github/licenses.go | |
parent | da7638dc112c4c106e8929601b642d2ca4596cba (diff) |
update dependencies
Diffstat (limited to 'vendor/github.com/google/go-github/github/licenses.go')
-rw-r--r-- | vendor/github.com/google/go-github/github/licenses.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/vendor/github.com/google/go-github/github/licenses.go b/vendor/github.com/google/go-github/github/licenses.go index 5340e61..e9cd177 100644 --- a/vendor/github.com/google/go-github/github/licenses.go +++ b/vendor/github.com/google/go-github/github/licenses.go @@ -5,7 +5,10 @@ package github -import "fmt" +import ( + "context" + "fmt" +) // LicensesService handles communication with the license related // methods of the GitHub API. @@ -58,7 +61,7 @@ func (l License) String() string { // List popular open source licenses. // // GitHub API docs: https://developer.github.com/v3/licenses/#list-all-licenses -func (s *LicensesService) List() ([]*License, *Response, error) { +func (s *LicensesService) List(ctx context.Context) ([]*License, *Response, error) { req, err := s.client.NewRequest("GET", "licenses", nil) if err != nil { return nil, nil, err @@ -68,7 +71,7 @@ func (s *LicensesService) List() ([]*License, *Response, error) { req.Header.Set("Accept", mediaTypeLicensesPreview) var licenses []*License - resp, err := s.client.Do(req, &licenses) + resp, err := s.client.Do(ctx, req, &licenses) if err != nil { return nil, resp, err } @@ -79,7 +82,7 @@ func (s *LicensesService) List() ([]*License, *Response, error) { // Get extended metadata for one license. // // GitHub API docs: https://developer.github.com/v3/licenses/#get-an-individual-license -func (s *LicensesService) Get(licenseName string) (*License, *Response, error) { +func (s *LicensesService) Get(ctx context.Context, licenseName string) (*License, *Response, error) { u := fmt.Sprintf("licenses/%s", licenseName) req, err := s.client.NewRequest("GET", u, nil) @@ -91,7 +94,7 @@ func (s *LicensesService) Get(licenseName string) (*License, *Response, error) { req.Header.Set("Accept", mediaTypeLicensesPreview) license := new(License) - resp, err := s.client.Do(req, license) + resp, err := s.client.Do(ctx, req, license) if err != nil { return nil, resp, err } |