forked from TrueCloudLab/frostfs-node
[#1598] golangci: Enable unparam linter
To drop unnecessary parameters and return values. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
4d5ae59a52
commit
fb928616cc
26 changed files with 123 additions and 155 deletions
|
@ -30,6 +30,8 @@ type InhumePrm struct {
|
|||
// InhumeRes encapsulates results of inhume operation.
|
||||
type InhumeRes struct{}
|
||||
|
||||
var inhumeRes = InhumeRes{}
|
||||
|
||||
// WithTarget sets a list of objects that should be inhumed and tombstone address
|
||||
// as the reason for inhume operation.
|
||||
//
|
||||
|
@ -83,7 +85,7 @@ func (e *StorageEngine) Inhume(ctx context.Context, prm InhumePrm) (res InhumeRe
|
|||
func (e *StorageEngine) inhume(ctx context.Context, prm InhumePrm) (InhumeRes, error) {
|
||||
addrsPerShard, err := e.groupObjectsByShard(ctx, prm.addrs, !prm.forceRemoval)
|
||||
if err != nil {
|
||||
return InhumeRes{}, err
|
||||
return inhumeRes, err
|
||||
}
|
||||
|
||||
var shPrm shard.InhumePrm
|
||||
|
@ -107,7 +109,7 @@ func (e *StorageEngine) inhume(ctx context.Context, prm InhumePrm) (InhumeRes, e
|
|||
zap.String("shard_id", shardID),
|
||||
zap.String("trace_id", tracingPkg.GetTraceID(ctx)),
|
||||
)
|
||||
return InhumeRes{}, errInhumeFailure
|
||||
return inhumeRes, errInhumeFailure
|
||||
}
|
||||
|
||||
if _, err := sh.Inhume(ctx, shPrm); err != nil {
|
||||
|
@ -119,11 +121,11 @@ func (e *StorageEngine) inhume(ctx context.Context, prm InhumePrm) (InhumeRes, e
|
|||
default:
|
||||
e.reportShardError(ctx, sh, "couldn't inhume object in shard", err)
|
||||
}
|
||||
return InhumeRes{}, err
|
||||
return inhumeRes, err
|
||||
}
|
||||
}
|
||||
|
||||
return InhumeRes{}, nil
|
||||
return inhumeRes, nil
|
||||
}
|
||||
|
||||
// groupObjectsByShard groups objects based on the shard(s) they are stored on.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue