-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
x/tools/cmd/godoc: add -tags like go build #3398
Comments
godoc ignores files that say "// +build ignore". It uses the files that would be built by go build. That seems like it is working as intended. Maybe after Go 1 we could give godoc a flag to allow the specification of additional build tags, like go build's -tags. Russ Labels changed: added priority-later, removed priority-triage. Status changed to Accepted. |
If you are someone like me who just stumbled across this old bug and are looking for a quick hack to solve your problem right now, use "go get golang.org/x/tools" to get the godoc source code then hack it like this:
Then use "go build" to build a local copy of godoc that is using the build tags you need. |
Change https://golang.org/cl/129099 mentions this issue: |
Good evening, as I currently need this feature in godoc to display documentation for specific build tags, I've added it to godoc. It took me a couple of days and I think it is ready for review 😊. Below I've added some printscreens how the design looks like for HTML and CLI. It would be great if some one from the Go Team, etc can review the code. |
The specified build tags in the -tags flag for the godoc command parses additional Go source files. All identifiers are getting listed alongside with the information from which build tag they originate. Fixes golang/go#3398 Change-Id: Ifcb716303d7c77ff5348156115197ea9b06c9dc2
The specified build tags in the -tags flag for the godoc command parses additional Go source files. All identifiers are getting listed alongside with the information from which build tag they originate. Fixes golang/go#3398 Change-Id: Ifcb716303d7c77ff5348156115197ea9b06c9dc2
The specified build tags in the -tags flag for the godoc command parses additional Go source files. All identifiers are getting listed alongside with the information from which build tag they originate. Fixes golang/go#3398 Change-Id: Ifcb716303d7c77ff5348156115197ea9b06c9dc2
The specified build tags in the -tags flag for the godoc command parses additional Go source files. All identifiers are getting listed alongside with the information from which build tag they originate. Fixes golang/go#3398 Change-Id: Ifcb716303d7c77ff5348156115197ea9b06c9dc2
The specified build tags in the -tags flag for the godoc command parses additional Go source files. All identifiers are getting listed alongside with the information from which build tag they originate. Fixes golang/go#3398 Change-Id: Ifcb716303d7c77ff5348156115197ea9b06c9dc2
The text was updated successfully, but these errors were encountered: