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
|
@ -114,13 +114,13 @@ func (s *Server) RemoveContainer(_ context.Context, req *control.RemoveContainer
|
|||
return nil, status.Error(codes.PermissionDenied, err.Error())
|
||||
}
|
||||
|
||||
if len(req.Body.GetContainerId()) > 0 && len(req.Body.GetOwner()) > 0 {
|
||||
if len(req.GetBody().GetContainerId()) > 0 && len(req.GetBody().GetOwner()) > 0 {
|
||||
return nil, status.Error(codes.InvalidArgument, "specify the owner and container at the same time is not allowed")
|
||||
}
|
||||
var vub uint32
|
||||
if len(req.Body.GetContainerId()) > 0 {
|
||||
if len(req.GetBody().GetContainerId()) > 0 {
|
||||
var containerID cid.ID
|
||||
if err := containerID.Decode(req.Body.GetContainerId()); err != nil {
|
||||
if err := containerID.Decode(req.GetBody().GetContainerId()); err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("failed to parse container ID: %s", err.Error()))
|
||||
}
|
||||
var err error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue