aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github/repos_comments.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-02-12 22:24:33 +0000
committerNiall Sheridan <nsheridan@gmail.com>2017-02-12 22:24:33 +0000
commitba4840c52becf73c2749c9ef0f2f09ed0b9d5c7f (patch)
tree61b839884d66c9dd8269e26117aa4e4c995ad119 /vendor/github.com/google/go-github/github/repos_comments.go
parent6e00d0000e54f21a4a393e67fd914bda4d394f4a (diff)
Update dependencies
Diffstat (limited to 'vendor/github.com/google/go-github/github/repos_comments.go')
-rw-r--r--vendor/github.com/google/go-github/github/repos_comments.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/github.com/google/go-github/github/repos_comments.go b/vendor/github.com/google/go-github/github/repos_comments.go
index 34a8d02..7abedc8 100644
--- a/vendor/github.com/google/go-github/github/repos_comments.go
+++ b/vendor/github.com/google/go-github/github/repos_comments.go
@@ -50,13 +50,13 @@ func (s *RepositoriesService) ListComments(owner, repo string, opt *ListOptions)
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeReactionsPreview)
- comments := new([]*RepositoryComment)
- resp, err := s.client.Do(req, comments)
+ var comments []*RepositoryComment
+ resp, err := s.client.Do(req, &comments)
if err != nil {
return nil, resp, err
}
- return *comments, resp, err
+ return comments, resp, nil
}
// ListCommitComments lists all the comments for a given commit SHA.
@@ -77,13 +77,13 @@ func (s *RepositoriesService) ListCommitComments(owner, repo, sha string, opt *L
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeReactionsPreview)
- comments := new([]*RepositoryComment)
- resp, err := s.client.Do(req, comments)
+ var comments []*RepositoryComment
+ resp, err := s.client.Do(req, &comments)
if err != nil {
return nil, resp, err
}
- return *comments, resp, err
+ return comments, resp, nil
}
// CreateComment creates a comment for the given commit.