golang.org/x One-click installation script

Source: Internet
Author: User
Tags git clone

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  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.