[#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)
}
func (c *ttlNetCache) keys() []interface{} {
return c.cache.Keys()
}
// entity that provides LRU cache interface.
type lruNetCache struct {
cache *lru.Cache

View file

@ -404,17 +404,6 @@ type morphEACLFetcher struct {
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) {
table, err := s.w.GetEACL(cnr)
if err != nil {

View file

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

View file

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

View file

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