mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 16:10:50 +00:00
chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994)
This PR replaces unnecessary calls to formatting functions (`fmt.Printf`, `fmt.Errorf`, ...) by non-formatting equivalents. Resolves #7967 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7994 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: chavacava <chavacava@noreply.codeberg.org> Co-committed-by: chavacava <chavacava@noreply.codeberg.org>
This commit is contained in:
parent
25f3f8e1d2
commit
99d697263f
126 changed files with 340 additions and 281 deletions
|
@ -4,7 +4,7 @@
|
|||
package forgefed
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"errors"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
@ -28,7 +28,7 @@ func Test_NodeInfoWellKnownUnmarshalJSON(t *testing.T) {
|
|||
},
|
||||
"empty": {
|
||||
item: []byte(``),
|
||||
wantErr: fmt.Errorf("cannot parse JSON: cannot parse empty string; unparsed tail: \"\""),
|
||||
wantErr: errors.New("cannot parse JSON: cannot parse empty string; unparsed tail: \"\""),
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ func Test_NewNodeInfoWellKnown(t *testing.T) {
|
|||
|
||||
_, err := NewNodeInfoWellKnown([]byte(`invalid`))
|
||||
if err == nil {
|
||||
t.Errorf("error was expected here")
|
||||
t.Error("error was expected here")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,6 @@ func Test_NewNodeInfo(t *testing.T) {
|
|||
|
||||
_, err := NewNodeInfo([]byte(`invalid`))
|
||||
if err == nil {
|
||||
t.Errorf("error was expected here")
|
||||
t.Error("error was expected here")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue