1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00

big golangci-lint cleanup

This commit is contained in:
Jesse Duffield
2020-03-09 11:34:10 +11:00
parent 8f68ac2129
commit e47ad846c4
34 changed files with 141 additions and 243 deletions

View File

@ -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
}
}