forked from TrueCloudLab/frostfs-node
[#857] golangci: Add protogetter linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
94ffe8bb45
commit
11add38e87
10 changed files with 25 additions and 22 deletions
|
@ -15,12 +15,12 @@ func (s *Server) Doctor(ctx context.Context, req *control.DoctorRequest) (*contr
|
|||
return nil, status.Error(codes.PermissionDenied, err.Error())
|
||||
}
|
||||
|
||||
if !req.Body.RemoveDuplicates {
|
||||
if !req.GetBody().GetRemoveDuplicates() {
|
||||
return nil, status.Error(codes.InvalidArgument, "operation not specified")
|
||||
}
|
||||
|
||||
var prm engine.RemoveDuplicatesPrm
|
||||
prm.Concurrency = int(req.Body.Concurrency)
|
||||
prm.Concurrency = int(req.GetBody().GetConcurrency())
|
||||
|
||||
err = s.s.RemoveDuplicates(ctx, prm)
|
||||
if err != nil {
|
||||
|
|
|
@ -36,8 +36,8 @@ func (s *Server) SetShardMode(_ context.Context, req *control.SetShardModeReques
|
|||
return nil, status.Error(codes.Internal, fmt.Sprintf("unknown shard mode: %s", requestedMode))
|
||||
}
|
||||
|
||||
for _, shardID := range s.getShardIDList(req.Body.GetShard_ID()) {
|
||||
err = s.s.SetShardMode(shardID, m, req.Body.GetResetErrorCounter())
|
||||
for _, shardID := range s.getShardIDList(req.GetBody().GetShard_ID()) {
|
||||
err = s.s.SetShardMode(shardID, m, req.GetBody().GetResetErrorCounter())
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue