Skip to content

Commit 9c5788c

Browse files
committed
Make golangci-lint pass muster
(cherry picked from commit ec2dc45)
1 parent 44df90f commit 9c5788c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

pkg/avx/collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func NewCollector() (prometheus.Collector, error) {
200200
progVer := spec.Programs["tracepoint__x86_fpu_regs_deactivated"].KernelVersion
201201

202202
if hostVer < progVer {
203-
return nil, errors.Wrapf(err, "The host kernel version (v%s) is too old to run the AVX512 collector program. Minimum version is v%s.", kernelVersionStr(hostVer), kernelVersionStr(progVer))
203+
return nil, errors.Wrapf(err, "The host kernel version (v%s) is too old to run the AVX512 collector program. Minimum version is v%s", kernelVersionStr(hostVer), kernelVersionStr(progVer))
204204
}
205205

206206
collection, err := bpf.NewCollection(spec)

pkg/blockio/blockio_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/intel/cri-resource-manager/pkg/testutils"
2525
)
2626

27-
var knownIOSchedulers map[string]bool = map[string]bool{
27+
var knownIOSchedulers = map[string]bool{
2828
"bfq": true,
2929
"cfq": true,
3030
"deadline": true,

pkg/log/log.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,17 @@ func (l Level) String() string {
193193
// setLevel sets the logging severity level.
194194
func (log *logging) setLevel(level Level) error {
195195
log.level = level
196-
kThreshold := ""
196+
threshold := ""
197197
switch level {
198198
case LevelDebug, LevelInfo:
199-
kThreshold = "INFO"
199+
threshold = "INFO"
200200
case LevelWarn:
201-
kThreshold = "WARNING"
201+
threshold = "WARNING"
202202
case LevelError, LevelPanic, LevelFatal:
203-
kThreshold = "ERROR"
203+
threshold = "ERROR"
204204
}
205-
if err := klogctl.Set("stderrthreshold", kThreshold); err != nil {
206-
return loggerError("failed to set log level/threshold to %s: %v", kThreshold, err)
205+
if err := klogctl.Set("stderrthreshold", threshold); err != nil {
206+
return loggerError("failed to set log level/threshold to %s: %v", threshold, err)
207207
}
208208
return nil
209209
}

0 commit comments

Comments
 (0)