diff --git a/.golangci.yml b/.golangci.yml index aac815130e..30c3db394a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -26,6 +26,7 @@ linters: - ineffassign - misspell - nakedret + - nilnesserr - noctx - nolintlint - perfsprint diff --git a/cpu/cpu_windows.go b/cpu/cpu_windows.go index 8af2a7fab9..a6000a3c50 100644 --- a/cpu/cpu_windows.go +++ b/cpu/cpu_windows.go @@ -190,7 +190,7 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) { ppis, powerInformationErr := getProcessorPowerInformation(ctx) if powerInformationErr != nil { - return ret, fmt.Errorf("failed to get processor power information: %w", err) + return ret, fmt.Errorf("failed to get processor power information: %w", powerInformationErr) } family, processorId, smBIOSErr := getSMBIOSProcessorInfo()