Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: add an automatic build tag generated by 'go test' tool #8277

Closed
gopherbot opened this issue Jun 24, 2014 · 2 comments
Closed

cmd/compile: add an automatic build tag generated by 'go test' tool #8277

gopherbot opened this issue Jun 24, 2014 · 2 comments

Comments

@gopherbot
Copy link

by rafrombrc:

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.)
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added repo-main, release-none.

@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc 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
@ALTree
Copy link
Member

ALTree commented Aug 10, 2017

Dup of #21360 and that one has some discussion, so closing this.

@ALTree ALTree closed this as completed Aug 10, 2017
@golang golang locked and limited conversation to collaborators Aug 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants