golangci-lint/test/testdata/testableexamples_test.go
2022-09-06 23:24:12 +02:00

24 lines
387 B
Go

//golangcitest:args -Etestableexamples
package testdata
import "fmt"
func Example_good() {
fmt.Println("hello")
// Output: hello
}
func Example_goodEmptyOutput() {
fmt.Println("")
// Output:
}
func Example_bad() { // want `^missing output for example, go test can't validate it$`
fmt.Println("hello")
}
//nolint:testableexamples
func Example_nolint() {
fmt.Println("hello")
}