fixed go vet issue w/ missing fmt.Sprintf values
This commit is contained in:
parent
c4c7b8e006
commit
412ef6f7ae
1 changed files with 3 additions and 3 deletions
|
@ -11,8 +11,8 @@ type RepoService struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET /v1/repos/{host}/{owner}/{name}
|
// GET /v1/repos/{host}/{owner}/{name}
|
||||||
func (s *RepoService) Get() (*model.Repo, error) {
|
func (s *RepoService) Get(host, owner, name string) (*model.Repo, error) {
|
||||||
var path = fmt.Sprintf("/v1/repos/%s/%s/%s")
|
var path = fmt.Sprintf("/v1/repos/%s/%s/%s", host, owner, name)
|
||||||
var repo = model.Repo{}
|
var repo = model.Repo{}
|
||||||
var err = s.run("PUT", path, nil, &repo)
|
var err = s.run("PUT", path, nil, &repo)
|
||||||
return &repo, err
|
return &repo, err
|
||||||
|
@ -20,7 +20,7 @@ func (s *RepoService) Get() (*model.Repo, error) {
|
||||||
|
|
||||||
// PUT /v1/repos/{host}/{owner}/{name}
|
// PUT /v1/repos/{host}/{owner}/{name}
|
||||||
func (s *RepoService) Update(repo *model.Repo) (*model.Repo, error) {
|
func (s *RepoService) Update(repo *model.Repo) (*model.Repo, error) {
|
||||||
var path = fmt.Sprintf("/v1/repos/%s/%s/%s")
|
var path = fmt.Sprintf("/v1/repos/%s/%s/%s", repo.Host, repo.Owner, repo.Name)
|
||||||
var result = model.Repo{}
|
var result = model.Repo{}
|
||||||
var err = s.run("PUT", path, &repo, &result)
|
var err = s.run("PUT", path, &repo, &result)
|
||||||
return &result, err
|
return &result, err
|
||||||
|
|
Loading…
Reference in a new issue