Text file src/cmd/go/testdata/script/test_bad_example.txt
1 # Tests that invalid examples are ignored. 2 # Verifies golang.org/issue/35284 3 # Disable vet, as 'tests' analyzer objects to surplus parameter. 4 go test -vet=off x_test.go 5 6 -- x_test.go -- 7 package x 8 9 import "fmt" 10 11 func ExampleThisShouldNotHaveAParameter(thisShouldntExist int) { 12 fmt.Println("X") 13 // Output: 14 } 15