.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.1.1 / stylecheck / testdata / src / CheckErrorReturn / CheckErrorReturn.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/stylecheck/testdata/src/CheckErrorReturn/CheckErrorReturn.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/stylecheck/testdata/src/CheckErrorReturn/CheckErrorReturn.go
new file mode 100644 (file)
index 0000000..feed85e
--- /dev/null
@@ -0,0 +1,10 @@
+// Package pkg ...
+package pkg
+
+func fn1() (error, int)        { return nil, 0 }      // want `error should be returned as the last argument`
+func fn2() (a, b error, c int) { return nil, nil, 0 } // want `error should be returned as the last argument`
+func fn3() (a int, b, c error) { return 0, nil, nil }
+func fn4() (error, error)      { return nil, nil }
+func fn5() int                 { return 0 }
+func fn6() (int, error)        { return 0, nil }
+func fn7() (error, int, error) { return nil, 0, nil }