Fix linting issues found by golangci-lint v2.0.2 (#16368)

* Fix linting issues found by golangci-lint v2.0.2

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen 2025-05-03 19:05:13 +02:00 committed by GitHub
parent 2e9ab9cc62
commit e7e3ab2824
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 178 additions and 208 deletions

View file

@ -145,7 +145,7 @@ func parseFlags() *config {
_, err := a.Parse(os.Args[1:])
if err != nil {
fmt.Fprintln(os.Stderr, fmt.Errorf("Error parsing commandline arguments: %w", err))
fmt.Fprintf(os.Stderr, "Error parsing commandline arguments: %s", err)
a.Usage(os.Args[1:])
os.Exit(2)
}

View file

@ -78,7 +78,7 @@ func (tv TagValue) MarshalJSON() ([]byte, error) {
case b == ':':
result.WriteString("_.")
default:
result.WriteString(fmt.Sprintf("_%X", b))
fmt.Fprintf(result, "_%X", b)
}
}
result.WriteByte('"')