Skip to content

Conversation

@Rozruch
Copy link

@Rozruch Rozruch commented Mar 17, 2020

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).

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

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 @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@Rozruch
Copy link
Author

Rozruch commented Mar 17, 2020

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@gopherbot
Copy link
Contributor

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 comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/223779.
After addressing review feedback, remember to publish your drafts!

@dmitshur dmitshur closed this Jul 10, 2020
@dmitshur
Copy link
Member

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.)

@gopherbot

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants