mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 02:11:01 +00:00
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}
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue