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/git_blobs.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/google/go-github/github/git_blobs.go') diff --git a/vendor/github.com/google/go-github/github/git_blobs.go b/vendor/github.com/google/go-github/github/git_blobs.go index 5a46708..67ea74a 100644 --- a/vendor/github.com/google/go-github/github/git_blobs.go +++ b/vendor/github.com/google/go-github/github/git_blobs.go @@ -5,7 +5,10 @@ package github -import "fmt" +import ( + "context" + "fmt" +) // Blob represents a blob object. type Blob struct { @@ -19,7 +22,7 @@ type Blob struct { // GetBlob fetchs a blob from a repo given a SHA. // // GitHub API docs: https://developer.github.com/v3/git/blobs/#get-a-blob -func (s *GitService) GetBlob(owner string, repo string, sha string) (*Blob, *Response, error) { +func (s *GitService) GetBlob(ctx context.Context, owner string, repo string, sha string) (*Blob, *Response, error) { u := fmt.Sprintf("repos/%v/%v/git/blobs/%v", owner, repo, sha) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -27,14 +30,14 @@ func (s *GitService) GetBlob(owner string, repo string, sha string) (*Blob, *Res } blob := new(Blob) - resp, err := s.client.Do(req, blob) + resp, err := s.client.Do(ctx, req, blob) return blob, resp, err } // CreateBlob creates a blob object. // // GitHub API docs: https://developer.github.com/v3/git/blobs/#create-a-blob -func (s *GitService) CreateBlob(owner string, repo string, blob *Blob) (*Blob, *Response, error) { +func (s *GitService) CreateBlob(ctx context.Context, owner string, repo string, blob *Blob) (*Blob, *Response, error) { u := fmt.Sprintf("repos/%v/%v/git/blobs", owner, repo) req, err := s.client.NewRequest("POST", u, blob) if err != nil { @@ -42,6 +45,6 @@ func (s *GitService) CreateBlob(owner string, repo string, blob *Blob) (*Blob, * } t := new(Blob) - resp, err := s.client.Do(req, t) + resp, err := s.client.Do(ctx, req, t) return t, resp, err } -- cgit v1.2.3