github.com/vanstinator/golangci-lint@v0.0.0-20240223191551-cc572f00d9d1/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 }