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