[#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 - revive
# some default golangci-lint linters # some default golangci-lint linters
- deadcode
- errcheck - errcheck
- gosimple - gosimple
- ineffassign - ineffassign
- staticcheck - staticcheck
- structcheck
- typecheck - typecheck
- unused - unused
- varcheck
# extra linters # extra linters
- exhaustive - 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 var p PlacementPolicy
for _, testCase := range testCases { for _, testCase := range testCases {
require.NoError(t, p.DecodeString(testCase)) require.NoError(t, p.DecodeString(testCase))
var b strings.Builder var b strings.Builder

View file

@ -4,6 +4,7 @@ import (
"context" "context"
"crypto/ecdsa" "crypto/ecdsa"
"errors" "errors"
"go.uber.org/zap" "go.uber.org/zap"
sessionv2 "github.com/TrueCloudLab/frostfs-api-go/v2/session" 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 return
} }
switch level { p.logger.Log(level, msg, fields...)
case zap.DebugLevel:
p.logger.Debug(msg, fields...)
case zap.WarnLevel:
p.logger.Warn(msg, fields...)
case zap.ErrorLevel:
p.logger.Error(msg, fields...)
}
} }
func fillDefaultInitParams(params *InitParameters, cache *sessionCache) { func fillDefaultInitParams(params *InitParameters, cache *sessionCache) {