-
Notifications
You must be signed in to change notification settings - Fork 2.3k
godoc: allow change of GOOS and GOARCH through environment #215
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
Conversation
Currently there is no way to change the GOOS and GOARCH thorugh godoc.Presentation.Get[Pkg,Cmd]PageInfo() as the function trims the goos and goarch arguments passed to handlerServer.GetPageInfo. When using this tool as a package, it is possible to change the target goos and goarch through environment variables only when the project is compiled into a binary. My proposal is to check if the environment has those variables set (They are used when setting context.Default.[GOOS,GOARCH] anyway, but on package import).
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
This PR (HEAD: c2f9a0b) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/223779 to see it. Tip: You can toggle comments from me using the |
|
Message from Gobot Gobot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/223779. |
|
Thanks for sending a change. Per https://golang.org/doc/contribute.html#design, please open an issue and fill in the template, then add a "Fixes golang/go#nnn." line here. I'd like to understand this change better, and it's more appropriate to discuss it on the issue tracker. Thanks. (Sorry about closing, clicked the wrong button.) |
Currently there is no way to change the GOOS and GOARCH thorugh godoc.Presentation.Get[Pkg,Cmd]PageInfo() as the function trims the goos and goarch arguments passed to handlerServer.GetPageInfo.
When using this tool as a package, it is possible to change the target goos and goarch through environment variables only when the project is compiled into a binary.
My proposal is to check if the environment has those variables set (They are used when setting context.Default.[GOOS,GOARCH] anyway, but on package import).