fix: enable err-error and errorf rules from perfsprint linter (#7859)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2024-12-10 08:03:43 +01:00
committed by GitHub
parent e8b31bf003
commit 156a2aa4c4
37 changed files with 102 additions and 69 deletions

View File

@@ -3,6 +3,7 @@ package parser
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"strconv"
"strings"
@@ -137,7 +138,7 @@ func (p *Parameters) UnmarshalJSON(data []byte) error {
(*p)[param.ParameterKey] = param.ParameterValue
}
default:
return fmt.Errorf("unsupported parameters format")
return errors.New("unsupported parameters format")
}
return nil