BREAK CHANGES: rename argument type for issue APIs

int -> int64
This commit is contained in:
Unknwon 2016-08-02 11:59:54 -07:00
parent 181ccc696c
commit e3ad13b2f3

View file

@ -41,7 +41,7 @@ func (c *Client) ListRepoIssues(owner, repo string, opt ListIssueOption) ([]*Iss
return issues, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues?page=%d", owner, repo, opt.Page), nil, nil, &issues) return issues, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues?page=%d", owner, repo, opt.Page), nil, nil, &issues)
} }
func (c *Client) GetIssue(owner, repo string, index int) (*Issue, error) { func (c *Client) GetIssue(owner, repo string, index int64) (*Issue, error) {
issue := new(Issue) issue := new(Issue)
return issue, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/%d", owner, repo, index), nil, nil, issue) return issue, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/%d", owner, repo, index), nil, nil, issue)
} }
@ -72,7 +72,7 @@ type EditIssueOption struct {
Milestone *int64 `json:"milestone"` Milestone *int64 `json:"milestone"`
} }
func (c *Client) EditIssue(owner, repo string, index int, opt EditIssueOption) (*Issue, error) { func (c *Client) EditIssue(owner, repo string, index int64, opt EditIssueOption) (*Issue, error) {
body, err := json.Marshal(&opt) body, err := json.Marshal(&opt)
if err != nil { if err != nil {
return nil, err return nil, err