From e5b09ec144d0f1dc720e030d7190d0cd6f5714d5 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Wed, 14 Feb 2024 14:48:09 +0100 Subject: [PATCH] Enable stylecheck linter Add stylecheck linter to golangci-lint. * Fix style issues. Signed-off-by: Ben Kochie --- .golangci.yml | 1 + collector/cpu_linux.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 3f7e4589..081ab335 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,6 +2,7 @@ linters: enable: - misspell - revive + - stylecheck disable: # Disable soon to deprecated[1] linters that lead to false # positives when build tags disable certain files[2] diff --git a/collector/cpu_linux.go b/collector/cpu_linux.go index fcbf651b..00c04dd9 100644 --- a/collector/cpu_linux.go +++ b/collector/cpu_linux.go @@ -84,7 +84,7 @@ func NewCPUCollector(logger log.Logger) (Collector, error) { isolcpus, err := sysfs.IsolatedCPUs() if err != nil { if !os.IsNotExist(err) { - return nil, fmt.Errorf("Unable to get isolated cpus: %w", err) + return nil, fmt.Errorf("unable to get isolated cpus: %w", err) } level.Debug(logger).Log("msg", "Could not open isolated file", "error", err) }