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

Comments

Projects
None yet
5 participants
@neophyt3
Copy link

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

This comment has been minimized.

Copy link
Member

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?

@neophyt3

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Member

commented Feb 7, 2018

Thanks for the reply.

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

/cc @odeke-em

@pciet

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

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 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.
You can’t perform that action at this time.