refactor: use errors.New to replace fmt.Errorf with no parameters (#19548)

This commit is contained in:
Qt
2024-02-24 21:14:13 +00:00
committed by GitHub
parent 95cc64b2d4
commit aa9ff3d8a7
14 changed files with 43 additions and 34 deletions
+1 -1
View File
@@ -550,7 +550,7 @@ var stringsBuilderPool = &sync.Pool{
// (instead of manipulating the int or math.Int object).
func FormatInt(v string) (string, error) {
if len(v) == 0 {
return "", fmt.Errorf("cannot format empty string")
return "", errors.New("cannot format empty string")
}
sign := ""