mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-07-13 05:04:13 -04:00
23 lines
387 B
Go
23 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")
|
|
}
|