[#1494] *: Fix linter warnings

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-06-08 11:36:50 +03:00 committed by fyrchik
parent bbf8b8e74d
commit f602d05b0a
5 changed files with 6 additions and 25 deletions

View file

@ -82,10 +82,6 @@ func (c *ttlNetCache) remove(key interface{}) {
c.cache.Remove(key) c.cache.Remove(key)
} }
func (c *ttlNetCache) keys() []interface{} {
return c.cache.Keys()
}
// entity that provides LRU cache interface. // entity that provides LRU cache interface.
type lruNetCache struct { type lruNetCache struct {
cache *lru.Cache cache *lru.Cache

View file

@ -404,17 +404,6 @@ type morphEACLFetcher struct {
w *cntClient.Client w *cntClient.Client
} }
type signedEACLTable eaclSDK.Table
func (s *signedEACLTable) ReadSignedData(_ []byte) ([]byte, error) {
return (*eaclSDK.Table)(s).Marshal()
}
func (s *signedEACLTable) SignedDataSize() int {
// TODO: #1147 add eacl.Table.Size method
return (*eaclSDK.Table)(s).ToV2().StableSize()
}
func (s *morphEACLFetcher) GetEACL(cnr cid.ID) (*eaclSDK.Table, error) { func (s *morphEACLFetcher) GetEACL(cnr cid.ID) (*eaclSDK.Table, error) {
table, err := s.w.GetEACL(cnr) table, err := s.w.GetEACL(cnr)
if err != nil { if err != nil {

View file

@ -70,12 +70,12 @@ func (e *StorageEngine) _select(prm SelectPrm) (SelectRes, error) {
if err != nil { if err != nil {
e.reportShardError(sh, "could not select objects from shard", err) e.reportShardError(sh, "could not select objects from shard", err)
return false return false
} else { }
for _, addr := range res.AddressList() { // save only unique values
if _, ok := uniqueMap[addr.EncodeToString()]; !ok { for _, addr := range res.AddressList() { // save only unique values
uniqueMap[addr.EncodeToString()] = struct{}{} if _, ok := uniqueMap[addr.EncodeToString()]; !ok {
addrList = append(addrList, addr) uniqueMap[addr.EncodeToString()] = struct{}{}
} addrList = append(addrList, addr)
} }
} }

View file

@ -1,7 +1,6 @@
package audit package audit
import ( import (
"errors"
"fmt" "fmt"
"github.com/nspcc-dev/neofs-node/pkg/morph/client" "github.com/nspcc-dev/neofs-node/pkg/morph/client"
@ -11,8 +10,6 @@ import (
// ResultID is an identity of audit result inside audit contract. // ResultID is an identity of audit result inside audit contract.
type ResultID []byte type ResultID []byte
var errUnsupported = errors.New("unsupported structure version")
// PutPrm groups parameters of PutAuditResult operation. // PutPrm groups parameters of PutAuditResult operation.
type PutPrm struct { type PutPrm struct {
result *auditAPI.Result result *auditAPI.Result

View file

@ -42,7 +42,6 @@ const (
var ( var (
errNilArgument = errors.New("empty argument") errNilArgument = errors.New("empty argument")
errUnsupported = errors.New("unsupported structure version")
) )
// NewFromMorph returns the wrapper instance from the raw morph client. // NewFromMorph returns the wrapper instance from the raw morph client.