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
One feature that I have wished to have is the ability to export names from the *_test.go
files in one package such that they can only be used by *_test.go files in other
packages. This is not possible, but it occurred to me recently that this can be
approximated by the use of compiler build tags. In fact, if the test tool automatically
injected a standard build tag (e.g. "testrun"), then it would be trivial to
add files to a package containing code that would only be exported when tests were being
run. (The files couldn't be named "*_test.go", of course, but the effect would
be the same.)
The text was updated successfully, but these errors were encountered:
rsc
changed the title
cmd/gc: add an automatic build tag generated by 'go test' tool
cmd/compile: add an automatic build tag generated by 'go test' tool
Jun 8, 2015
by rafrombrc:
The text was updated successfully, but these errors were encountered: