Fix lint found by golangci-lint

This commit is contained in:
Tim Hockin 2024-01-13 13:41:51 -08:00
parent 14321ef959
commit 9cf189f4e0
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -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]")
}

View File

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