1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-24 10:07:21 +02:00

fixed go vet issue w/ missing fmt.Sprintf values

This commit is contained in:
Brad Rydzewski 2014-08-09 16:55:51 -07:00
parent c4c7b8e006
commit 412ef6f7ae

View File

@ -11,8 +11,8 @@ type RepoService struct {
}
// GET /v1/repos/{host}/{owner}/{name}
func (s *RepoService) Get() (*model.Repo, error) {
var path = fmt.Sprintf("/v1/repos/%s/%s/%s")
func (s *RepoService) Get(host, owner, name string) (*model.Repo, error) {
var path = fmt.Sprintf("/v1/repos/%s/%s/%s", host, owner, name)
var repo = model.Repo{}
var err = s.run("PUT", path, nil, &repo)
return &repo, err
@ -20,7 +20,7 @@ func (s *RepoService) Get() (*model.Repo, error) {
// PUT /v1/repos/{host}/{owner}/{name}
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 err = s.run("PUT", path, &repo, &result)
return &result, err