github.com/chenfeining/golangci-lint@v1.0.2-0.20230730162517-14c6c67868df/test/testdata/testableexamples_test.go (about) 1 //golangcitest:args -Etestableexamples 2 package testdata 3 4 import "fmt" 5 6 func Example_good() { 7 fmt.Println("hello") 8 // Output: hello 9 } 10 11 func Example_goodEmptyOutput() { 12 fmt.Println("") 13 // Output: 14 } 15 16 func Example_bad() { // want `^missing output for example, go test can't validate it$` 17 fmt.Println("hello") 18 } 19 20 //nolint:testableexamples 21 func Example_nolint() { 22 fmt.Println("hello") 23 }