We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4e7a38 commit 8587396Copy full SHA for 8587396
errorlint/testdata/src/errorsis/errorsis.go
@@ -77,12 +77,14 @@ func NotEqualOperatorYoda() {
77
func CompareSwitch() {
78
err := doThing()
79
switch err { // want `switch on an error will fail on wrapped errors. Use errors.Is to check for specific errors`
80
+ case nil:
81
+ fmt.Println("nil")
82
case ErrFoo:
83
fmt.Println("ErrFoo")
84
}
85
86
-func CompareSwitchNilDefault() {
87
+func CompareSwitchSafe() {
88
89
switch err {
90
case nil:
0 commit comments