Skip to content

Commit

Permalink
chore: use errors.New to replace fmt.Errorf with no parameters
Browse files Browse the repository at this point in the history
Signed-off-by: RiceChuan <lc582041246@gmail.com>
  • Loading branch information
RiceChuan authored and jesseduffield committed Jan 2, 2025
1 parent 5e9ba82 commit c834e13
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/commands/git_commands/working_tree_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package git_commands

import (
"fmt"
"testing"

"github.com/go-errors/errors"
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit c834e13

Please sign in to comment.