forked from TrueCloudLab/frostfs-node
[#973] node: Resolve perfsprint linter
`fmt.Errorf can be replaced with errors.New` and `fmt.Sprintf can be replaced with string addition` Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
66a26b7775
commit
d433b49265
39 changed files with 143 additions and 72 deletions
|
@ -16,6 +16,8 @@ import (
|
|||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
|
||||
)
|
||||
|
||||
var errMissingUserID = errors.New("missing user ID")
|
||||
|
||||
type morphExecutor struct {
|
||||
rdr Reader
|
||||
wrt Writer
|
||||
|
@ -177,7 +179,7 @@ func (s *morphExecutor) Get(_ context.Context, body *container.GetRequestBody) (
|
|||
func (s *morphExecutor) List(_ context.Context, body *container.ListRequestBody) (*container.ListResponseBody, error) {
|
||||
idV2 := body.GetOwnerID()
|
||||
if idV2 == nil {
|
||||
return nil, fmt.Errorf("missing user ID")
|
||||
return nil, errMissingUserID
|
||||
}
|
||||
|
||||
var id user.ID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue