diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-09 11:34:10 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-09 12:23:13 +1100 |
commit | e47ad846c4b6100aaff7013a3516d329bde19194 (patch) | |
tree | ead7f3f0a911d7ee4f4f46640c2bf449a74e8e05 /pkg/commands | |
parent | 8f68ac21293f1a0476802974817d9f87875f8743 (diff) |
big golangci-lint cleanup
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/branch_list_builder.go | 6 | ||||
-rw-r--r-- | pkg/commands/git_test.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/commands/branch_list_builder.go b/pkg/commands/branch_list_builder.go index cb4920585..26864d944 100644 --- a/pkg/commands/branch_list_builder.go +++ b/pkg/commands/branch_list_builder.go @@ -73,7 +73,7 @@ func (b *BranchListBuilder) obtainSafeBranches() []*Branch { if err != nil { panic(err) } - bIter.ForEach(func(b *plumbing.Reference) error { + _ = bIter.ForEach(func(b *plumbing.Reference) error { name := b.Name().Short() branches = append(branches, &Branch{Name: name}) return nil @@ -93,7 +93,7 @@ func (b *BranchListBuilder) appendNewBranches(finalBranches, newBranches, existi func sanitisedReflogName(reflogBranch *Branch, safeBranches []*Branch) string { for _, safeBranch := range safeBranches { - if strings.ToLower(safeBranch.Name) == strings.ToLower(reflogBranch.Name) { + if strings.EqualFold(safeBranch.Name, reflogBranch.Name) { return safeBranch.Name } } @@ -125,7 +125,7 @@ func (b *BranchListBuilder) Build() []*Branch { func branchIncluded(branchName string, branches []*Branch) bool { for _, existingBranch := range branches { - if strings.ToLower(existingBranch.Name) == strings.ToLower(branchName) { + if strings.EqualFold(existingBranch.Name, branchName) { return true } } diff --git a/pkg/commands/git_test.go b/pkg/commands/git_test.go index 779e31f68..99ab351fa 100644 --- a/pkg/commands/git_test.go +++ b/pkg/commands/git_test.go @@ -2130,7 +2130,7 @@ func TestGitCommandSkipEditorCommand(t *testing.T) { ) }) - cmd.RunSkipEditorCommand("true") + _ = cmd.RunSkipEditorCommand("true") } func TestFindDotGitDir(t *testing.T) { |