I'm trying out Go for the first time. I was following these docs and wanted to run the go tour locally, but I haven't figured out how to get it to work
Where is the tool "tour" supposed to be found?
I'm on OSX 10.11.3, and I installed Go via Homebrew
my Go entries in .zshrc
export GOPATH=$HOME/code/Go
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
EDIT: Figured it out thanks to help from ##go-nuts and Stackoverflow. I guess the docs are a bit out of date, and Homebrew doesn't install gotour by default. Loving the community already!
评论:
txmoose:
balloonanimalfarm:Same point in my Golang career and same platform right now bud. In a terminal, you should be able to type
go tool tour
And it'll fire up a local server and launch a new web browser tab/window. If it doesn't, you can open http://localhost:3999 (or whatever port it is, I can't recall off hand).
If that doesn't work, remove Go via homebrew and install it via the official installer.
Good luck!
EDIT: Added in the proper address for the local server, which is http://127.0.0.1:3999/
mm256:What exactly is the error it's giving?
Running
go tool tour
works for me withgo version go1.5 linux/amd64
.
coolshanth:I've got 'gotour' command in path when installed the tour.
hopsnob:Yep, this is what happened for me too.
Did you go get the tour