From de6d2c524430287c699aaa898c1325da6afea539 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Wed, 20 Jun 2018 22:39:07 +0100 Subject: Update dependencies --- vendor/github.com/xanzy/go-gitlab/repository_files.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'vendor/github.com/xanzy/go-gitlab/repository_files.go') diff --git a/vendor/github.com/xanzy/go-gitlab/repository_files.go b/vendor/github.com/xanzy/go-gitlab/repository_files.go index 873fe73..473128a 100644 --- a/vendor/github.com/xanzy/go-gitlab/repository_files.go +++ b/vendor/github.com/xanzy/go-gitlab/repository_files.go @@ -17,6 +17,7 @@ package gitlab import ( + "bytes" "fmt" "net/url" ) @@ -93,7 +94,7 @@ type GetRawFileOptions struct { // // GitLab API docs: // https://docs.gitlab.com/ce/api/repository_files.html#get-raw-file-from-repository -func (s *RepositoryFilesService) GetRawFile(pid interface{}, fileName string, opt *GetRawFileOptions, options ...OptionFunc) (*File, *Response, error) { +func (s *RepositoryFilesService) GetRawFile(pid interface{}, fileName string, opt *GetRawFileOptions, options ...OptionFunc) ([]byte, *Response, error) { project, err := parseID(pid) if err != nil { return nil, nil, err @@ -105,13 +106,13 @@ func (s *RepositoryFilesService) GetRawFile(pid interface{}, fileName string, op return nil, nil, err } - f := new(File) - resp, err := s.client.Do(req, f) + var f bytes.Buffer + resp, err := s.client.Do(req, &f) if err != nil { return nil, resp, err } - return f, resp, err + return f.Bytes(), resp, err } // FileInfo represents file details of a GitLab repository file. -- cgit v1.2.3