:chore: Refactor codes and upgrade golangci-lint in ci
This commit is contained in:
1 parent
a1ad5bafde
commit
1326df816b
4 files changed
+25
-18
No files matched your search
@@ -5,6 +5,7 @@ package utils
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
@@ -468,7 +469,7 @@ func TestConfirmPreRun(t *testing.T) {
|
||||
cmd.SetIn(strings.NewReader(tt.input))
|
||||
|
||||
err := ConfirmPreRun(cmd, "Would do something")
|
||||
if err != tt.wantErr {
|
||||
if !errors.Is(err, tt.wantErr) {
|
||||
t.Errorf("ConfirmPreRun() error = %v, want %v", err, tt.wantErr)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user