chore(all): replace all fmt.Errorf without paramters with errors.New (#21068)

This commit is contained in:
yukionfire
2024-07-25 14:54:49 +02:00
committed by GitHub
parent 6a2d039e12
commit d6ad92db0f
57 changed files with 127 additions and 103 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ package ormfield
import (
"encoding/binary"
"fmt"
"errors"
"io"
"google.golang.org/protobuf/reflect/protoreflect"
@@ -183,6 +183,6 @@ func DecodeCompactUint32(reader io.Reader) (uint32, error) {
x |= uint32(buf[4])
return x, nil
default:
return 0, fmt.Errorf("unexpected case")
return 0, errors.New("unexpected case")
}
}
+2 -2
View File
@@ -2,7 +2,7 @@ package ormfield
import (
"encoding/binary"
"fmt"
"errors"
"io"
"google.golang.org/protobuf/reflect/protoreflect"
@@ -213,6 +213,6 @@ func DecodeCompactUint64(reader io.Reader) (uint64, error) {
x |= uint64(buf[8])
return x, nil
default:
return 0, fmt.Errorf("unexpected case")
return 0, errors.New("unexpected case")
}
}