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/db/repo_branch.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/db/repo_branch.go') 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 } -- cgit v1.2.3