X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fcoc-go-data%2Ftools%2Fpkg%2Fmod%2Fhonnef.co%2Fgo%2Ftools%40v0.0.1-2020.1.5%2Fstylecheck%2Ftestdata%2Fsrc%2FCheckErrorVarNames%2FCheckErrorVarNames.go;fp=.config%2Fcoc%2Fextensions%2Fcoc-go-data%2Ftools%2Fpkg%2Fmod%2Fhonnef.co%2Fgo%2Ftools%40v0.0.1-2020.1.5%2Fstylecheck%2Ftestdata%2Fsrc%2FCheckErrorVarNames%2FCheckErrorVarNames.go;h=5652ef9a5cc72c425c6f7b06c1226a4d952a7b9b;hb=4d07c77cf4d78cab8639e13ddc3c22495e585b0b;hp=0000000000000000000000000000000000000000;hpb=b3950616b54221c40a7dab9099bda675007e5b6e;p=dotfiles%2F.git diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.0.1-2020.1.5/stylecheck/testdata/src/CheckErrorVarNames/CheckErrorVarNames.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.0.1-2020.1.5/stylecheck/testdata/src/CheckErrorVarNames/CheckErrorVarNames.go new file mode 100644 index 00000000..5652ef9a --- /dev/null +++ b/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.0.1-2020.1.5/stylecheck/testdata/src/CheckErrorVarNames/CheckErrorVarNames.go @@ -0,0 +1,22 @@ +// Package pkg ... +package pkg + +import ( + "errors" + "fmt" +) + +var ( + foo = errors.New("") // want `error var foo should have name of the form errFoo` + errBar = errors.New("") + qux, fisk, errAnother = errors.New(""), errors.New(""), errors.New("") // want `error var qux should have name of the form errFoo` `error var fisk should have name of the form errFoo` + abc = fmt.Errorf("") // want `error var abc should have name of the form errFoo` + + errAbc = fmt.Errorf("") +) + +var wrong = errors.New("") // want `error var wrong should have name of the form errFoo` + +var result = fn() + +func fn() error { return nil }