Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Commit f46f7c8

Browse files
committed
Fix #95 by removing unused imports and using a non-pointer reader
Signed-off-by: Jonas Franz <[email protected]>
1 parent c59ff77 commit f46f7c8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gitea/attachment.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"encoding/json"
99
"fmt"
1010
"io"
11-
"io/ioutil"
1211
"mime/multipart"
1312
"net/http"
1413
"time"
@@ -55,7 +54,7 @@ func (c *Client) CreateReleaseAttachment(user, repo string, release int64, file
5554
return nil, err
5655
}
5756

58-
if _, err = io.Copy(part, file); err != nil {
57+
if _, err = io.Copy(part, *file); err != nil {
5958
return nil, err
6059
}
6160
if err = writer.Close(); err != nil {

0 commit comments

Comments
 (0)