This is a creation in Article, where the information may have evolved or changed.
Recently tried to learn Golang, on a website (really forget) found Gotour is a gray often in the Tutorial & guide, after the search found that a predecessor gave the local installation of offline Gotour method, but the actual installation process found some problems:
1. Bygo get bitbucket.org/mikespook/go-tour-zh/gotour命令安装时报错,提示missing Mercurial command,原来是先需要安装Mercurial;
2. After successful installation of the above command, the original paste said directly run Gotour command can be http://127.0.0.1:3999 for local access Gotour, however, the bin directory is not gotour ... Workaround
In summary, this post will be the overall installation process comb (Go language installation and configuration is no longer redundant)
1. Download and install mercurial and git
Mercurial:https://www.mercurial-scm.org/wiki/download#windows
Git:https://git-scm.com/download/win
(If you cannot access scientific Internet or Baidu search for domestic download source)
2. Download the Gotour offline package with mercurial, the command is as follows
HG Clone Https://bitbucket.org/mikespook/go-tour-zh
3. Download the gotools&gonet in git with the following command
Go get github.com/golang/net
Go get Github.com/golang/tools
4. Adjust the file path to ensure that the three folders downloaded above are in the following path
Gotour Offline Package: $GOPATH/src/bitbucket.org/mikespook
NET: $GOPATH/src/golang.org/x/
Tools: $GOPATH/src/golang.org/x/
($GOPATH refer to your own defined Gopath path, please refer to the Go locale configuration, it should be noted that gopath to establish SRC, bin, pkg three folders)
5. In the command line switch to $gopath/src/bitbucket.org/mikespook/go-tour-zh/gotour, execute the following command
Go Install
6. At this point, the Gotour.exe file has been generated under the $gopath/bin directory and copied to the $goroot/bin directory
7. Execute gotour on the command line and visit http://127.0.0.1:3999 in the browser to see the local gotour
Resources:
1. Build an offline Go Programming Guide--gotour
2.golang-revel Installation Notes
3.go-tour-zh Offline Installation
4.Go Language Development environment configuration