mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 22:05:59 +00:00
Fix lint found by golangci-lint
This commit is contained in:
parent
14321ef959
commit
9cf189f4e0
@ -1201,13 +1201,13 @@ func (path callPath) String() string {
|
||||
}
|
||||
case p.index:
|
||||
if len(parts) > 0 {
|
||||
parts[last] = parts[last] + "[i]"
|
||||
parts[last] += "[i]"
|
||||
} else {
|
||||
parts = append(parts, "[i]")
|
||||
}
|
||||
case p.key:
|
||||
if len(parts) > 0 {
|
||||
parts[last] = parts[last] + "[key]"
|
||||
parts[last] += "[key]"
|
||||
} else {
|
||||
parts = append(parts, "[key]")
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ func hasPathPrefix(path, prefix string) bool {
|
||||
return true
|
||||
}
|
||||
if !strings.HasSuffix(path, string(filepath.Separator)) {
|
||||
prefix = prefix + string(filepath.Separator)
|
||||
prefix += string(filepath.Separator)
|
||||
}
|
||||
return strings.HasPrefix(path, prefix)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user