From f04b2d43509816ecfda93aa5d0d1fd685d9b860f Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Sun, 1 Mar 2020 14:55:03 +0800 Subject: lint: fix some Golang CI lint issues (#5955) --- internal/context/repo.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'internal/context') diff --git a/internal/context/repo.go b/internal/context/repo.go index 7d030458..31729f9e 100644 --- a/internal/context/repo.go +++ b/internal/context/repo.go @@ -15,9 +15,9 @@ import ( "github.com/gogs/git-module" + "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/db" "gogs.io/gogs/internal/db/errors" - "gogs.io/gogs/internal/conf" ) type PullRequest struct { @@ -142,10 +142,6 @@ func RepoAssignment(pages ...bool) macaron.Handler { ownerName := c.Params(":username") repoName := strings.TrimSuffix(c.Params(":reponame"), ".git") - refName := c.Params(":branchname") - if len(refName) == 0 { - refName = c.Params(":path") - } // Check if the user is the same as the repository owner if c.IsLogged && c.User.LowerName == strings.ToLower(ownerName) { -- cgit v1.2.3