Fix lint found by golangci-lint
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user