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

x/tools/cmd/godoc: godoc does not work with play as an option #23730

Closed
neophyt3 opened this issue Feb 7, 2018 · 5 comments
Closed

x/tools/cmd/godoc: godoc does not work with play as an option #23730

neophyt3 opened this issue Feb 7, 2018 · 5 comments
Labels
FrozenDueToAge help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@neophyt3
Copy link

neophyt3 commented Feb 7, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.9.3 windows/amd64

What operating system and processor architecture are you using (go env)?

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\go-work
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\PRADEE~1\AppData\Local\Temp\go-build506488887=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config

What did you do?

C:\Users\pradeepchauhan>godoc -http=:8555 -play

What did you expect to see?

Go documentation with playground

What did you see instead?

This is the error I get in console
C:\Users\pradeep>godoc -http=:8555 -play
2018/02/07 23:03:34 godoc.html.Execute: template: godoc.html:58:8: executing "godoc.html" at <$.Share>: can't evaluate field Share in type godoc.Page

@bradfitz
Copy link
Contributor

bradfitz commented Feb 7, 2018

I think you have a version mismatch. Try updating your godoc binary? Are you using the godoc binary from a release, or built yourself?

@bradfitz bradfitz added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Feb 7, 2018
@neophyt3
Copy link
Author

neophyt3 commented Feb 7, 2018

@bradfitz
I tried both
First with the godoc binary which is pre-packaged with the latest release
and Second way I tried by intalling the binary by go get command
and executing the same command on this (GOPATH/bin/)new binary

I am still facing the same issue with both the binaries

@bradfitz bradfitz added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. help wanted and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Feb 7, 2018
@bradfitz bradfitz modified the milestones: Go1.10, Go1.11 Feb 7, 2018
@bradfitz
Copy link
Contributor

bradfitz commented Feb 7, 2018

Thanks for the reply.

It'd be helpful if somebody else could reproduce this too.

/cc @odeke-em

@pciet
Copy link
Contributor

pciet commented Feb 7, 2018

Seen on macOS 10.12.6, go version go1.9.4 darwin/amd64 from the macOS installer.

godoc -http=:8555 -play
2018/02/07 15:27:12 godoc.html.Execute: template: godoc.html:58:8: executing "godoc.html" at <$.Share>: can't evaluate field Share in type godoc.Page

screen shot 2018-02-07 at 3 29 25 pm

godoc -http=:8555 doesn't have this error. Behavior is the same with a different port specified.

@andybons
Copy link
Member

andybons commented Feb 7, 2018

Sorry for the trouble. This was me.

This is fixed in go1.10, though, which will be released very soon.

@andybons andybons closed this as completed Feb 7, 2018
@mikioh mikioh changed the title godoc does not work with play as an option x/tools/cmd/godoc: godoc does not work with play as an option Feb 21, 2018
@golang golang locked and limited conversation to collaborators Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants