Update golangci-lint to v1.62.2, fix issues (#32845)
Update it and fix new issues related to `redefines-builtin-id`
This commit is contained in:
parent
7616aeb2ea
commit
1cfb718976
13 changed files with 36 additions and 36 deletions
|
@ -465,15 +465,15 @@ func (repo *Repository) getBranches(env []string, commitID string, limit int) ([
|
|||
|
||||
refs := strings.Split(stdout, "\n")
|
||||
|
||||
var max int
|
||||
var maxNum int
|
||||
if len(refs) > limit {
|
||||
max = limit
|
||||
maxNum = limit
|
||||
} else {
|
||||
max = len(refs) - 1
|
||||
maxNum = len(refs) - 1
|
||||
}
|
||||
|
||||
branches := make([]string, max)
|
||||
for i, ref := range refs[:max] {
|
||||
branches := make([]string, maxNum)
|
||||
for i, ref := range refs[:maxNum] {
|
||||
parts := strings.Fields(ref)
|
||||
|
||||
branches[i] = parts[len(parts)-1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue