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
When running in command-line mode, specifying the -goroot flag has no effect. Running:
godoc -goroot=/usr/local/go1.4.2 math/big
would list Float too:
Package big implements multi-precision arithmetic (big numbers). The
following numeric types are supported:
Int signed integers
Rat rational numbers
Float floating-point numbers
If served over HTTP (godoc -goroot=/usr/local/go1.4.2 math/big -http=:6060), the resulting documentation page is as expected.
Setting GOROOT environment variable instead works as expected:
GOROOT=/usr/local/go1.4.2 godoc math/big
The text was updated successfully, but these errors were encountered:
This happens because when a normal package path is passed, the GOROOT is assumed to be build.Default.GOROOT.
If you do - godoc -goroot=/usr/local/go1.4.2 /usr/local/go1.4.2/src/math/big. It gives the correct output. Although it defeats the purpose of passing goroot in the first place.
- Setting the GOROOT build path to the value passed from the command line.
- Clarified the return values to named parameters for extra clarity.
- And while here, added some missed out error handling. Just logging the error
to preserve original behavior.
Fixesgolang/go#13296
Change-Id: I91427eee790928a3cfb51ae207747e9a17bd5496
Reviewed-on: https://go-review.googlesource.com/110275
Run-TryBot: Andrew Bonventre <[email protected]>
Reviewed-by: Andrew Bonventre <[email protected]>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When running in command-line mode, specifying the
-goroot
flag has no effect. Running:would list
Float
too:If served over HTTP (
godoc -goroot=/usr/local/go1.4.2 math/big -http=:6060
), the resulting documentation page is as expected.Setting
GOROOT
environment variable instead works as expected:The text was updated successfully, but these errors were encountered: