add delete repo

This commit is contained in:
Unknwon 2015-10-08 21:00:46 -04:00
parent 519eee0af0
commit e42d1bd6fe
1 changed files with 5 additions and 0 deletions

View File

@ -69,3 +69,8 @@ func (c *Client) CreateOrgRepo(org string, opt CreateRepoOption) (*Repository, e
return repo, c.getParsedResponse("POST", fmt.Sprintf("/org/%s/repos", org),
http.Header{"content-type": []string{"application/json"}}, bytes.NewReader(body), repo)
}
// DeleteRepo deletes a repository of user or organization.
func (c *Client) DeleteRepo(owner, repo string) error {
return c.getParsedResponse("DELETE", fmt.Sprintf("/repos/%s/%s", owner, repo), nil, nil)
}