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

Remove unused imports and use a non-pointer reader #96

Merged
merged 2 commits into from
Mar 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions gitea/attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"time"
Expand Down Expand Up @@ -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)
Expand Down