Skip to content

Commit 01a8118

Browse files
thockink8s-publishing-bot
authored andcommitted
Fix lint found by golangci-lint
Kubernetes-commit: 9cf189f4e029ee31ee0cdbf0e6365554a59b8ef4
1 parent e876b7d commit 01a8118

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd/defaulter-gen/generators/defaulter.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1201,13 +1201,13 @@ func (path callPath) String() string {
12011201
}
12021202
case p.index:
12031203
if len(parts) > 0 {
1204-
parts[last] = parts[last] + "[i]"
1204+
parts[last] += "[i]"
12051205
} else {
12061206
parts = append(parts, "[i]")
12071207
}
12081208
case p.key:
12091209
if len(parts) > 0 {
1210-
parts[last] = parts[last] + "[key]"
1210+
parts[last] += "[key]"
12111211
} else {
12121212
parts = append(parts, "[key]")
12131213
}

cmd/import-boss/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ func hasPathPrefix(path, prefix string) bool {
429429
return true
430430
}
431431
if !strings.HasSuffix(path, string(filepath.Separator)) {
432-
prefix = prefix + string(filepath.Separator)
432+
prefix += string(filepath.Separator)
433433
}
434434
return strings.HasPrefix(path, prefix)
435435
}

0 commit comments

Comments
 (0)