mirror of
https://github.com/prometheus/prometheus.git
synced 2025-07-03 11:03:25 +00:00
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:
parent
2e9ab9cc62
commit
e7e3ab2824
50 changed files with 178 additions and 208 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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('"')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue