diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-03-01 14:55:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-01 14:55:03 +0800 |
commit | f04b2d43509816ecfda93aa5d0d1fd685d9b860f (patch) | |
tree | 548c7b0b4ff2f187569e74cf99c19742a44f18aa /internal/db/repo_branch.go | |
parent | 9c65798902386341a205d52b6b3842e1dc2c751a (diff) |
lint: fix some Golang CI lint issues (#5955)
Diffstat (limited to 'internal/db/repo_branch.go')
-rw-r--r-- | internal/db/repo_branch.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/repo_branch.go b/internal/db/repo_branch.go index 3eb15fef..94313101 100644 --- a/internal/db/repo_branch.go +++ b/internal/db/repo_branch.go @@ -46,7 +46,7 @@ func GetBranchesByPath(path string) ([]*Branch, error) { func (repo *Repository) GetBranch(br string) (*Branch, error) { if !git.IsBranchExist(repo.RepoPath(), br) { - return nil, errors.ErrBranchNotExist{br} + return nil, errors.ErrBranchNotExist{Name: br} } return &Branch{ RepoPath: repo.RepoPath(), @@ -102,7 +102,7 @@ func GetProtectBranchOfRepoByName(repoID int64, name string) (*ProtectBranch, er if err != nil { return nil, err } else if !has { - return nil, errors.ErrBranchNotExist{name} + return nil, errors.ErrBranchNotExist{Name: name} } return protectBranch, nil } |