You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import"testing"funcTestBug(t*testing.T) {
}
What did you expect to see?
go test
PASS
ok github.com/andy-trimble/flag-bug 0.005s
What did you see instead?
go test
flag provided but not defined: -test.timeout
Usage of /var/folders/bg/m0hrtm6s7v9drh13khyj29t80000gn/T/go-build828887410/b001/flag-bug.test:
-fl
exit status 2
FAIL github.com/andy-trimble/flag-bug 0.005s
The text was updated successfully, but these errors were encountered:
Testing flags are now registered in the new Init function, which is invoked by the generated main function for the test. As a result, testing flags are now only registered when running a test binary, and packages that call flag.Parse during package initialization may cause tests to fail.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
main.go
main_test.go
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: