[#302] Fix whitespace linter errors

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-01-11 18:12:38 +03:00 committed by Alex Vanin
parent 8d79ac1d13
commit 5e231c515a
10 changed files with 2 additions and 20 deletions

View file

@ -31,7 +31,6 @@ func init() {
}
func versionRun(cmd *cobra.Command, args []string) {
versionInfo := VersionInfo{Version: misc.Version, Build: misc.Build, Debug: misc.Debug}
if flagJSON {

View file

@ -81,6 +81,5 @@ func registerNotificationHandlers(scHash util.Uint160, lis event.Listener, parse
lis.RegisterHandler(hi)
}
}
}

View file

@ -840,5 +840,4 @@ func u64FromHexString(str string) uint64 {
}
return v
}

View file

@ -91,7 +91,6 @@ func (s *Shard) Delete(prm *DeletePrm) (*DeleteRes, error) {
zap.Stringer("object_address", prm.addr[i]),
zap.String("error", err.Error()))
}
}
return nil, nil

View file

@ -24,7 +24,6 @@ func New(c netmap.Service) *Server {
func (s *Server) LocalNodeInfo(
ctx context.Context,
req *netmapGRPC.LocalNodeInfoRequest) (*netmapGRPC.LocalNodeInfoResponse, error) {
resp, err := s.srv.LocalNodeInfo(ctx, netmap.LocalNodeInfoRequestFromGRPCMessage(req))
if err != nil {
// TODO: think about how we transport errors through gRPC

View file

@ -27,7 +27,6 @@ func NewExecutionService(ni *netmap.NodeInfo, v *pkg.Version) netmap.Service {
func (s *executorSvc) LocalNodeInfo(
_ context.Context,
_ *netmap.LocalNodeInfoRequest) (*netmap.LocalNodeInfoResponse, error) {
body := new(netmap.LocalNodeInfoResponseBody)
body.SetVersion(s.version.ToV2())
body.SetNodeInfo(s.localNodeInfo)

View file

@ -24,7 +24,6 @@ func NewSignService(key *ecdsa.PrivateKey, svc netmap.Service) netmap.Service {
func (s *signService) LocalNodeInfo(
ctx context.Context,
req *netmap.LocalNodeInfoRequest) (*netmap.LocalNodeInfoResponse, error) {
resp, err := s.sigSvc.HandleUnaryRequest(ctx, req,
func(ctx context.Context, req interface{}) (util.ResponseMessage, error) {
return s.svc.LocalNodeInfo(ctx, req.(*netmap.LocalNodeInfoRequest))

View file

@ -187,7 +187,6 @@ func (b Service) Put(ctx context.Context) (object.PutObjectStreamer, error) {
func (b Service) Head(
ctx context.Context,
request *object.HeadRequest) (*object.HeadResponse, error) {
cid, err := getContainerIDFromRequest(request)
if err != nil {
return nil, err
@ -264,7 +263,6 @@ func (b Service) Search(request *object.SearchRequest, stream objectSvc.SearchSt
func (b Service) Delete(
ctx context.Context,
request *object.DeleteRequest) (*object.DeleteResponse, error) {
cid, err := getContainerIDFromRequest(request)
if err != nil {
return nil, err
@ -335,7 +333,6 @@ func (b Service) GetRange(request *object.GetRangeRequest, stream objectSvc.GetO
func (b Service) GetRangeHash(
ctx context.Context,
request *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error) {
cid, err := getContainerIDFromRequest(request)
if err != nil {
return nil, err
@ -446,9 +443,7 @@ func (b Service) findRequestInfo(
req metaWithToken,
cid *container.ID,
op acl.Operation) (info requestInfo, err error) {
// fetch actual container
cnr, err := b.containers.Get(cid)
cnr, err := b.containers.Get(cid) // fetch actual container
if err != nil || cnr.OwnerID() == nil {
return info, ErrUnknownContainer
}
@ -561,7 +556,6 @@ func getObjectOwnerFromMessage(req interface{}) (id *owner.ID, err error) {
default:
return nil, errors.New("unsupported request type")
}
}
// main check function for basic ACL

View file

@ -48,7 +48,6 @@ func (c SenderClassifier) Classify(
req metaWithToken,
cid *container.ID,
cnr *container.Container) (role acl.Role, isIR bool, key []byte, err error) {
if cid == nil {
return 0, false, nil, errors.Wrap(ErrMalformedRequest, "container id is not set")
}
@ -146,9 +145,7 @@ func (c SenderClassifier) isInnerRingKey(owner []byte) (bool, error) {
func (c SenderClassifier) isContainerKey(
owner, cid []byte,
cnr *container.Container) (bool, error) {
// first check current netmap
nm, err := core.GetLatestNetworkMap(c.netmap)
nm, err := core.GetLatestNetworkMap(c.netmap) // first check current netmap
if err != nil {
return false, err
}
@ -174,7 +171,6 @@ func lookupKeyInContainer(
nm *netmap.Netmap,
owner, cid []byte,
cnr *container.Container) (bool, error) {
cnrNodes, err := nm.GetContainerNodes(cnr.PlacementPolicy(), cid)
if err != nil {
return false, err

View file

@ -210,7 +210,6 @@ func (s *payloadSizeLimiter) release(close bool) (*AccessIdentifiers, error) {
func writeHashes(hashers []*payloadChecksumHasher) {
for i := range hashers {
hashers[i].checksumWriter(hashers[i].hasher.Sum(nil))
}
}