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/gitignore.go | |
parent | da7638dc112c4c106e8929601b642d2ca4596cba (diff) |
update dependencies
Diffstat (limited to 'vendor/github.com/google/go-github/github/gitignore.go')
-rw-r--r-- | vendor/github.com/google/go-github/github/gitignore.go | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/vendor/github.com/google/go-github/github/gitignore.go b/vendor/github.com/google/go-github/github/gitignore.go index 396178d..2f691bc 100644 --- a/vendor/github.com/google/go-github/github/gitignore.go +++ b/vendor/github.com/google/go-github/github/gitignore.go @@ -5,7 +5,10 @@ package github -import "fmt" +import ( + "context" + "fmt" +) // GitignoresService provides access to the gitignore related functions in the // GitHub API. @@ -25,15 +28,15 @@ func (g Gitignore) String() string { // List all available Gitignore templates. // -// https://developer.github.com/v3/gitignore/#listing-available-templates -func (s GitignoresService) List() ([]string, *Response, error) { +// GitHub API docs: https://developer.github.com/v3/gitignore/#listing-available-templates +func (s GitignoresService) List(ctx context.Context) ([]string, *Response, error) { req, err := s.client.NewRequest("GET", "gitignore/templates", nil) if err != nil { return nil, nil, err } var availableTemplates []string - resp, err := s.client.Do(req, &availableTemplates) + resp, err := s.client.Do(ctx, req, &availableTemplates) if err != nil { return nil, resp, err } @@ -43,8 +46,8 @@ func (s GitignoresService) List() ([]string, *Response, error) { // Get a Gitignore by name. // -// https://developer.github.com/v3/gitignore/#get-a-single-template -func (s GitignoresService) Get(name string) (*Gitignore, *Response, error) { +// GitHub API docs: https://developer.github.com/v3/gitignore/#get-a-single-template +func (s GitignoresService) Get(ctx context.Context, name string) (*Gitignore, *Response, error) { u := fmt.Sprintf("gitignore/templates/%v", name) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -52,7 +55,7 @@ func (s GitignoresService) Get(name string) (*Gitignore, *Response, error) { } gitignore := new(Gitignore) - resp, err := s.client.Do(req, gitignore) + resp, err := s.client.Do(ctx, req, gitignore) if err != nil { return nil, resp, err } |