From cdbef997666132599cc92dc22aa94de3db04adeb Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Fri, 2 Mar 2018 15:48:43 +0100 Subject: [PATCH] Remove unused imports and use a non-pointer reader (#96) * Fix #95 by removing unused imports and using a non-pointer reader Signed-off-by: Jonas Franz (cherry picked from commit f46f7c8) Signed-off-by: Jonas Franz * Replace *io.Reader with io.Reader Signed-off-by: Jonas Franz --- gitea/attachment.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gitea/attachment.go b/gitea/attachment.go index b48bcee..e90a711 100644 --- a/gitea/attachment.go +++ b/gitea/attachment.go @@ -8,7 +8,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "mime/multipart" "net/http" "time" @@ -46,7 +45,7 @@ func (c *Client) GetReleaseAttachment(user, repo string, release int64, id int64 } // CreateReleaseAttachment creates an attachment for the given release -func (c *Client) CreateReleaseAttachment(user, repo string, release int64, file *io.Reader, filename string) (*Attachment, error) { +func (c *Client) CreateReleaseAttachment(user, repo string, release int64, file io.Reader, filename string) (*Attachment, error) { // Write file to body body := new(bytes.Buffer) writer := multipart.NewWriter(body)