diff options
author | RiceChuan <lc582041246@gmail.com> | 2024-12-12 05:26:11 +0100 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2024-12-15 09:15:57 +0100 |
commit | c3d37894aad0e60341b24012af4edb725a70b2e5 (patch) | |
tree | 63da4f6ff44c18864537e70241df1814adedbdae /models | |
parent | Add standard-compliant route to serve outdated R packages (#32783) (diff) | |
download | forgejo-c3d37894aad0e60341b24012af4edb725a70b2e5.tar.xz forgejo-c3d37894aad0e60341b24012af4edb725a70b2e5.zip |
chore: use errors.New to replace fmt.Errorf with no parameters (#32800)
use errors.New to replace fmt.Errorf with no parameters
Signed-off-by: RiceChuan <lc582041246@gmail.com>
(cherry picked from commit dfd75944992fc6508ec891b4c29715c23e59e4ed)
Diffstat (limited to 'models')
-rw-r--r-- | models/db/context_committer_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/db/context_committer_test.go b/models/db/context_committer_test.go index 38e91f22ed..849c5dea41 100644 --- a/models/db/context_committer_test.go +++ b/models/db/context_committer_test.go @@ -4,7 +4,7 @@ package db // it's not db_test, because this file is for testing the private type halfCommitter import ( - "fmt" + "errors" "testing" "github.com/stretchr/testify/assert" @@ -80,7 +80,7 @@ func Test_halfCommitter(t *testing.T) { testWithCommitter(mockCommitter, func(committer Committer) error { defer committer.Close() if true { - return fmt.Errorf("error") + return errors.New("error") } return committer.Commit() }) @@ -94,7 +94,7 @@ func Test_halfCommitter(t *testing.T) { testWithCommitter(mockCommitter, func(committer Committer) error { committer.Close() committer.Commit() - return fmt.Errorf("error") + return errors.New("error") }) mockCommitter.Assert(t) |