Gox
With Github.com/golang, one-click installation of golang.org/x Packages
For Gopher on the mainland, the go get install golang.org/x package often fails
So here's a bash script that says one-click Install golang.org/x Package
- Windows user Git-bash to execute gox.sh this script
- *unix the user first
chmod +x gox.sh
adds the ability to execute the permission. ./gox.sh
perform one-click installation in use
#!/usr/bin/env bash# in order to be compatible with BASHCD $GOPATH under Windows; #创建 $GOPATH/src/golang.org/x directory mkdir-p src /GOLANG.ORG/X;CD Src/golang.org/x;echo "Already installed golang.org/x package"; Ls;echo "the name of the" for "box in the following line you can define" for name in "Glog yourself. "Image" "Perf" "snappy" "term" "Sync" "Winstrap" "CWG" "Leveldb" "Text" "Net" "Build" "Protobuf" "DEP" "sys" "Crypto" "GDD O "Tools" "Scratch" "Proposal" "mock" "Oauth2" "FreeType" "Debug" "Mobile" "Gofrontend" "Lint" "AppEngine" "Geo" "Review" "Arch" "VGo" "Exp" "Time";d o if [-D "$name"] then CD $name; Echo $name "The package already exists, use git pull to update the source code"; Git pull; else git_url= "Https://github.com/golang/${name}.git"; echo "Start clone golang.org/x Mirror code on github.com: ${git_url}"; git clone--depth 1 "$git _url"; CD $name; Fi #go install;done