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
|
@ -21,6 +21,8 @@ import (
|
|||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/version"
|
||||
)
|
||||
|
||||
var errMissingHeaderInResponse = errors.New("missing header in response")
|
||||
|
||||
// BalanceOfPrm groups parameters of BalanceOf operation.
|
||||
type BalanceOfPrm struct {
|
||||
commonPrm
|
||||
|
@ -654,7 +656,7 @@ func HeadObject(ctx context.Context, prm HeadObjectPrm) (*HeadObjectRes, error)
|
|||
var hdr objectSDK.Object
|
||||
|
||||
if !res.ReadHeader(&hdr) {
|
||||
return nil, fmt.Errorf("missing header in response")
|
||||
return nil, errMissingHeaderInResponse
|
||||
}
|
||||
|
||||
return &HeadObjectRes{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue