From 4518357ad748b1c872490802bb9f05df095e03aa Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 18 Nov 2020 15:45:15 +0300 Subject: [PATCH] [#176] localstore: Fix linter's remarks Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/blobstor/delete.go | 5 ++--- pkg/local_object_storage/engine/select.go | 5 ++--- pkg/local_object_storage/shard/get.go | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pkg/local_object_storage/blobstor/delete.go b/pkg/local_object_storage/blobstor/delete.go index e219d62dd..a7123148b 100644 --- a/pkg/local_object_storage/blobstor/delete.go +++ b/pkg/local_object_storage/blobstor/delete.go @@ -4,13 +4,12 @@ import ( "os" "github.com/nspcc-dev/neofs-api-go/pkg/object" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/pkg/errors" ) // DeletePrm groups the parameters of Delete operation. type DeletePrm struct { - addr *objectSDK.Address + addr *object.Address } // DeleteRes groups resulting values of Delete operation. @@ -19,7 +18,7 @@ type DeleteRes struct{} // WithAddress is a Delete option to set the address of the object to delete. // // Option is required. -func (p *DeletePrm) WithAddress(addr *objectSDK.Address) *DeletePrm { +func (p *DeletePrm) WithAddress(addr *object.Address) *DeletePrm { if p != nil { p.addr = addr } diff --git a/pkg/local_object_storage/engine/select.go b/pkg/local_object_storage/engine/select.go index 5ca1b84fd..e09254517 100644 --- a/pkg/local_object_storage/engine/select.go +++ b/pkg/local_object_storage/engine/select.go @@ -2,7 +2,6 @@ package engine import ( "github.com/nspcc-dev/neofs-api-go/pkg/object" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" "go.uber.org/zap" ) @@ -18,7 +17,7 @@ type SelectRes struct { } // WithFilters is a Select option to set the object filters. -func (p *SelectPrm) WithFilters(fs objectSDK.SearchFilters) *SelectPrm { +func (p *SelectPrm) WithFilters(fs object.SearchFilters) *SelectPrm { if p != nil { p.filters = fs } @@ -27,7 +26,7 @@ func (p *SelectPrm) WithFilters(fs objectSDK.SearchFilters) *SelectPrm { } // AddressList returns list of addresses of the selected objects. -func (r *SelectRes) AddressList() []*objectSDK.Address { +func (r *SelectRes) AddressList() []*object.Address { return r.addrList } diff --git a/pkg/local_object_storage/shard/get.go b/pkg/local_object_storage/shard/get.go index 7c8f1052e..b20a6f895 100644 --- a/pkg/local_object_storage/shard/get.go +++ b/pkg/local_object_storage/shard/get.go @@ -74,7 +74,6 @@ func (s *Shard) Get(prm *GetPrm) (*GetRes, error) { if prm.ln < 0 { // try to read from WriteCache // TODO: implement - res, err := s.blobStor.Get( new(blobstor.GetPrm). WithAddress(prm.addr),