Skip to content

Commit 4d558d6

Browse files
mlitaysk
authored andcommitted
Fix test for Go 1.16
1 parent 99ef7d5 commit 4d558d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/cmd_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ package cmd
1717

1818
import (
1919
"bytes"
20-
"fmt"
2120
"io/ioutil"
21+
"os"
2222
"strings"
2323
"testing"
2424
)
@@ -74,7 +74,8 @@ func TestRootCmd(t *testing.T) {
7474
args: []string{"-f", "/nogood"},
7575
stdin: "",
7676
assertError: func(err error) bool {
77-
return fmt.Sprintf("%T", err) == "*os.PathError"
77+
_, ok := err.(*os.PathError)
78+
return ok
7879
},
7980
expOut: "",
8081
},

0 commit comments

Comments
 (0)