From 30802e07b2d84fbc213b490d3402707dffe60096 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Mon, 10 Apr 2017 21:18:42 +0100 Subject: update dependencies --- vendor/github.com/google/go-github/github/orgs.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'vendor/github.com/google/go-github/github/orgs.go') diff --git a/vendor/github.com/google/go-github/github/orgs.go b/vendor/github.com/google/go-github/github/orgs.go index 7421605..8b126f0 100644 --- a/vendor/github.com/google/go-github/github/orgs.go +++ b/vendor/github.com/google/go-github/github/orgs.go @@ -6,6 +6,7 @@ package github import ( + "context" "fmt" "time" ) @@ -85,7 +86,7 @@ type OrganizationsListOptions struct { // as the opts.Since parameter for the next call. // // GitHub API docs: https://developer.github.com/v3/orgs/#list-all-organizations -func (s *OrganizationsService) ListAll(opt *OrganizationsListOptions) ([]*Organization, *Response, error) { +func (s *OrganizationsService) ListAll(ctx context.Context, opt *OrganizationsListOptions) ([]*Organization, *Response, error) { u, err := addOptions("organizations", opt) if err != nil { return nil, nil, err @@ -97,7 +98,7 @@ func (s *OrganizationsService) ListAll(opt *OrganizationsListOptions) ([]*Organi } orgs := []*Organization{} - resp, err := s.client.Do(req, &orgs) + resp, err := s.client.Do(ctx, req, &orgs) if err != nil { return nil, resp, err } @@ -108,7 +109,7 @@ func (s *OrganizationsService) ListAll(opt *OrganizationsListOptions) ([]*Organi // organizations for the authenticated user. // // GitHub API docs: https://developer.github.com/v3/orgs/#list-user-organizations -func (s *OrganizationsService) List(user string, opt *ListOptions) ([]*Organization, *Response, error) { +func (s *OrganizationsService) List(ctx context.Context, user string, opt *ListOptions) ([]*Organization, *Response, error) { var u string if user != "" { u = fmt.Sprintf("users/%v/orgs", user) @@ -126,7 +127,7 @@ func (s *OrganizationsService) List(user string, opt *ListOptions) ([]*Organizat } var orgs []*Organization - resp, err := s.client.Do(req, &orgs) + resp, err := s.client.Do(ctx, req, &orgs) if err != nil { return nil, resp, err } @@ -137,7 +138,7 @@ func (s *OrganizationsService) List(user string, opt *ListOptions) ([]*Organizat // Get fetches an organization by name. // // GitHub API docs: https://developer.github.com/v3/orgs/#get-an-organization -func (s *OrganizationsService) Get(org string) (*Organization, *Response, error) { +func (s *OrganizationsService) Get(ctx context.Context, org string) (*Organization, *Response, error) { u := fmt.Sprintf("orgs/%v", org) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -145,7 +146,7 @@ func (s *OrganizationsService) Get(org string) (*Organization, *Response, error) } organization := new(Organization) - resp, err := s.client.Do(req, organization) + resp, err := s.client.Do(ctx, req, organization) if err != nil { return nil, resp, err } @@ -156,7 +157,7 @@ func (s *OrganizationsService) Get(org string) (*Organization, *Response, error) // Edit an organization. // // GitHub API docs: https://developer.github.com/v3/orgs/#edit-an-organization -func (s *OrganizationsService) Edit(name string, org *Organization) (*Organization, *Response, error) { +func (s *OrganizationsService) Edit(ctx context.Context, name string, org *Organization) (*Organization, *Response, error) { u := fmt.Sprintf("orgs/%v", name) req, err := s.client.NewRequest("PATCH", u, org) if err != nil { @@ -164,7 +165,7 @@ func (s *OrganizationsService) Edit(name string, org *Organization) (*Organizati } o := new(Organization) - resp, err := s.client.Do(req, o) + resp, err := s.client.Do(ctx, req, o) if err != nil { return nil, resp, err } -- cgit v1.2.3