Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ linters:
- ineffassign # Detects when assignments to existing variables are not used [fast: true, auto-fix: false]
- intrange # intrange is a linter to find places where for loops could make use of an integer range. [fast: true, auto-fix: false]
- loggercheck # (logrlint): Checks key value pairs for common logger libraries (kitlog,klog,logr,zap). [fast: false, auto-fix: false]
- makezero # Finds slice declarations with non-zero initial length [fast: false, auto-fix: false]
- mirror # reports wrong mirror patterns of bytes/strings usage [fast: false, auto-fix: false]
- misspell # Finds commonly misspelled English words in comments [fast: true, auto-fix: true]
- nakedret # Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false]
- nolintlint # Reports ill-formed or insufficient nolint directives [fast: true, auto-fix: false]
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/autocomplete/autocomplete.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func InstallCommandRun(ctx context.Context, argsI interface{}) (i interface{}, e
}

// Append to file
_, err = f.Write([]byte(autoCompleteScript + "\n"))
_, err = f.WriteString(autoCompleteScript + "\n")
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/config/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ profiles:
send_telemetry: true
`

if _, err := tmpFile.Write([]byte(configContent)); err != nil {
if _, err := tmpFile.WriteString(configContent); err != nil {
return nil, err
}
if err := tmpFile.Close(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/registry/v1/helpers_docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func writeHelperScript(scriptPath string, scriptContent string) error {
}
defer f.Close()

_, err = f.Write([]byte(scriptContent))
_, err = f.WriteString(scriptContent)
if err != nil {
return err
}
Expand Down
Loading