如何离线获得Golang编程导览[关闭]

I wanted to download go-tour offline
how can i get it?
I have tried to use code

  go get code.google.com/p/go-tour/gotour

but it doesn't work.

If by saying "it doesn't work" you mean that you get error message: package code.google.com/p/go-tour/gotour: cannot download, $GOPATH not set. For more details see: go help gopath, then you need to setup GOPATH and then go get desired package.

Anyway, here is the complete solution to get GoTour working, assuming you already have Go installed.

mkdir go_tour && cd go_tour
export GOPATH=`pwd`
go get code.google.com/p/go-tour/gotour
./bin/gotour

Can you expand on "it doesn't work"?

  $ go get code.google.com/p/go-tour/gotour

  $ gotour

2014/03/22 20:02:53 Serving content from /Users/matt/.go/src/code.google.com/p/go-tour
2014/03/22 20:02:53 A browser window should open. If not, please visit http://127.0.0.1:3999

No problems for me. Make sure your $GOPATH is set correctly and exported in your shell. Check the output of go env to confirm.