1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-01-24 03:16:18 +02:00

Merge pull request #73 from francoishill/patch-1

Rename PostAttachment arg to `issueID`
This commit is contained in:
Andy Grunwald 2017-05-07 18:23:13 +02:00 committed by GitHub
commit 72f092baf9

View File

@ -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)