Skip to content

Commit 2f912ad

Browse files
committed
chore: use errors.New to replace fmt.Errorf with no parameters
Signed-off-by: RiceChuan <[email protected]>
1 parent 4a7cf60 commit 2f912ad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/commands/git_commands/working_tree_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package git_commands
22

33
import (
4-
"fmt"
54
"testing"
65

76
"github.com/go-errors/errors"
@@ -100,7 +99,7 @@ func TestWorkingTreeDiscardAllFileChanges(t *testing.T) {
10099
Added: true,
101100
},
102101
removeFile: func(string) error {
103-
return fmt.Errorf("an error occurred when removing file")
102+
return errors.New("an error occurred when removing file")
104103
},
105104
runner: oscommands.NewFakeRunner(t),
106105
expectedError: "an error occurred when removing file",

0 commit comments

Comments
 (0)