diff options
author | delvh <leon@kske.dev> | 2021-12-02 20:36:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 20:36:50 +0100 |
commit | 4646c7c52d453dcc817f8e14b991de0e4f67b492 (patch) | |
tree | 426e0f4e544c0ad87c32fbad6775e9fc6a10e2aa /modules | |
parent | fbf3208229effba63cfe2276d7d7d120f143a8b2 (diff) | |
download | gitea-4646c7c52d453dcc817f8e14b991de0e4f67b492.tar.gz gitea-4646c7c52d453dcc817f8e14b991de0e4f67b492.zip |
Use fmt.Sprintf correctly (#17886)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/convert/pull.go | 2 | ||||
-rw-r--r-- | modules/migration/pullrequest.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/convert/pull.go b/modules/convert/pull.go index a5e7d9608a..2e2c1b85bc 100644 --- a/modules/convert/pull.go +++ b/modules/convert/pull.go @@ -79,7 +79,7 @@ func ToAPIPullRequest(pr *models.PullRequest, doer *user_model.User) *api.PullRe }, Head: &api.PRBranchInfo{ Name: pr.HeadBranch, - Ref: fmt.Sprintf(git.PullPrefix+"%d/head", pr.Index), + Ref: fmt.Sprintf("%s%d/head", git.PullPrefix, pr.Index), RepoID: -1, }, } diff --git a/modules/migration/pullrequest.go b/modules/migration/pullrequest.go index 498768ea48..bbf1fe7653 100644 --- a/modules/migration/pullrequest.go +++ b/modules/migration/pullrequest.go @@ -45,7 +45,7 @@ func (p *PullRequest) IsForkPullRequest() bool { // GetGitRefName returns pull request relative path to head func (p PullRequest) GetGitRefName() string { - return fmt.Sprintf(git.PullPrefix+"%d/head", p.Number) + return fmt.Sprintf("%s%d/head", git.PullPrefix, p.Number) } // PullRequestBranch represents a pull request branch |