From 88bab6c4c87e924fabae656481021437d9370045 Mon Sep 17 00:00:00 2001 From: Francois Date: Sat, 6 May 2017 14:09:22 +0200 Subject: [PATCH] refactor: rename PostAttachment arg to `issueID` --- issue.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/issue.go b/issue.go index 992139f..84e31a0 100644 --- a/issue.go +++ b/issue.go @@ -521,9 +521,9 @@ func (s *IssueService) DownloadAttachment(attachmentID string) (*Response, error return resp, nil } -// PostAttachment uploads r (io.Reader) as an attachment to a given attachmentID -func (s *IssueService) PostAttachment(attachmentID string, r io.Reader, attachmentName string) (*[]Attachment, *Response, error) { - apiEndpoint := fmt.Sprintf("rest/api/2/issue/%s/attachments", attachmentID) +// PostAttachment uploads r (io.Reader) as an attachment to a given issueID +func (s *IssueService) PostAttachment(issueID string, r io.Reader, attachmentName string) (*[]Attachment, *Response, error) { + apiEndpoint := fmt.Sprintf("rest/api/2/issue/%s/attachments", issueID) b := new(bytes.Buffer) writer := multipart.NewWriter(b)