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
|
@ -24,6 +24,7 @@ var (
|
|||
errMixedTypesInRule = errors.New("found mixed type of actions and conditions in rule")
|
||||
errNoActionsInRule = errors.New("there are no actions in rule")
|
||||
errUnsupportedResourceFormat = errors.New("unsupported resource format")
|
||||
errFailedToParseAllAny = errors.New("any/all is not parsed")
|
||||
)
|
||||
|
||||
// PrintHumanReadableAPEChain print APE chain rules.
|
||||
|
@ -188,7 +189,7 @@ func parseAnyAll(lexeme string) (bool, error) {
|
|||
case "all":
|
||||
return false, nil
|
||||
default:
|
||||
return false, fmt.Errorf("any/all is not parsed")
|
||||
return false, errFailedToParseAllAny
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue