發現運作官方給的指令:
$go get golang.org/x/tour
連續幾次,一直報連接配接逾時,無法下載下傳包。不過因為 golang.org/x/xxx 這類包托管在 github.com/golang,是以我們可以從github安裝,隻是要注意幾個包的依賴關系。
步驟是:
1、建立好目錄結構:
$cd $GOPATH/src
$mkdir -p golang.org/x/
$cd golang.org/x/
2、下載下傳相關的包
$git clone https://github.com/golang/net
$git clone https://github.com/golang/tools
$git clone https://github.com/golang/tour
3、安裝和運作
$go install github.com/golang/tour
$cd $GOPATH/bin
$tour