*: Fix linter warnings

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-02-24 15:04:12 +03:00 committed by LeL
parent b5874778e9
commit fa670ab57a
4 changed files with 2 additions and 23 deletions

View file

@ -36,6 +36,7 @@ func FromStatusV2(st *status.Status) Status {
switch code := st.Code(); {
case status.IsSuccess(code):
//nolint:exhaustive
switch status.LocalizeSuccess(&code); code {
case status.OK:
decoder = new(SuccessDefaultV2)

View file

@ -3,7 +3,6 @@ package netmap
import (
"testing"
subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id"
"github.com/stretchr/testify/require"
)
@ -43,12 +42,6 @@ func newReplica(c uint32, s string) *Replica {
return r
}
func newSubnetID(id uint32) *subnetid.ID {
var s subnetid.ID
s.SetNumber(id)
return &s
}
func nodeInfoFromAttributes(props ...string) NodeInfo {
attrs := make([]*NodeAttribute, len(props)/2)
for i := range attrs {
@ -61,14 +54,6 @@ func nodeInfoFromAttributes(props ...string) NodeInfo {
return *n
}
func getTestNode(props ...string) *Node {
m := make(map[string]string, len(props)/2)
for i := 0; i < len(props); i += 2 {
m[props[i]] = props[i+1]
}
return &Node{AttrMap: m}
}
type enumIface interface {
FromString(string) bool
String() string

View file

@ -181,7 +181,6 @@ type clientPack struct {
type CallOption func(config *callConfig)
type callConfig struct {
isRetry bool
useDefaultSession bool
key *ecdsa.PrivateKey
@ -207,12 +206,6 @@ func WithSession(token *session.Token) CallOption {
}
}
func retry() CallOption {
return func(config *callConfig) {
config.isRetry = true
}
}
func useDefaultSession() CallOption {
return func(config *callConfig) {
config.useDefaultSession = true

View file

@ -357,7 +357,7 @@ func TestSessionCache(t *testing.T) {
require.NoError(t, err)
require.Contains(t, tokens, st)
_, err = pool.GetObject(ctx, address.Address{}, retry())
_, err = pool.GetObject(ctx, address.Address{})
require.Error(t, err)
// cache must not contain session token