From a095f410fd1aba0d405cd31e55aa315d904b615a Mon Sep 17 00:00:00 2001 From: RiceChuan Date: Thu, 12 Dec 2024 11:21:16 +0800 Subject: [PATCH] chore: use errors.New to replace fmt.Errorf with no parameters Signed-off-by: RiceChuan --- pkg/commands/git_commands/working_tree_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/commands/git_commands/working_tree_test.go b/pkg/commands/git_commands/working_tree_test.go index 18549fb9a77..42f68536b6f 100644 --- a/pkg/commands/git_commands/working_tree_test.go +++ b/pkg/commands/git_commands/working_tree_test.go @@ -1,7 +1,6 @@ package git_commands import ( - "fmt" "testing" "github.com/go-errors/errors" @@ -100,7 +99,7 @@ func TestWorkingTreeDiscardAllFileChanges(t *testing.T) { Added: true, }, removeFile: func(string) error { - return fmt.Errorf("an error occurred when removing file") + return errors.New("an error occurred when removing file") }, runner: oscommands.NewFakeRunner(t), expectedError: "an error occurred when removing file",