[#2] Update lint config, fix lint errors

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2023-02-17 17:13:05 +03:00 committed by Anton Nikiforov
parent e9c1a2ab2b
commit d4f5bba459
4 changed files with 2 additions and 12 deletions

View file

@ -32,15 +32,12 @@ linters:
- revive
# some default golangci-lint linters
- deadcode
- errcheck
- gosimple
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
# extra linters
- exhaustive

View file

@ -28,7 +28,6 @@ FILTER City EQ SPB AND SSD EQ true OR City EQ SPB AND Rating GE 5 AS SPBSSD`,
var p PlacementPolicy
for _, testCase := range testCases {
require.NoError(t, p.DecodeString(testCase))
var b strings.Builder

View file

@ -4,6 +4,7 @@ import (
"context"
"crypto/ecdsa"
"errors"
"go.uber.org/zap"
sessionv2 "github.com/TrueCloudLab/frostfs-api-go/v2/session"

View file

@ -1664,14 +1664,7 @@ func (p *Pool) log(level zapcore.Level, msg string, fields ...zap.Field) {
return
}
switch level {
case zap.DebugLevel:
p.logger.Debug(msg, fields...)
case zap.WarnLevel:
p.logger.Warn(msg, fields...)
case zap.ErrorLevel:
p.logger.Error(msg, fields...)
}
p.logger.Log(level, msg, fields...)
}
func fillDefaultInitParams(params *InitParameters, cache *sessionCache) {