Skip to content

One key installation of the latest version of the golang

License

Notifications You must be signed in to change notification settings

ureuerae/golang-install

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Golang-Install

The latest version of the golang is installed.

  • Support Linux / MacOS / FreeBSD
  • Support custom version
  • Support custom GOPATH

English | 简体中文

Notice

  • By default, the latest version of go version is installed, and the GOPATH directory is ~/.go/path

Installation

Online

Default install

$ curl https://raw.githubusercontent.com/skiy/golang-install/master/install.sh | bash

Custom version

  • MY_DIY_GO_VERSION is a custom golang version, such as: 1.12.8
  • MY_DIY_GO_PATH is a custom gopath, such as: /home/myhome/go
$ curl -SL https://raw.githubusercontent.com/skiy/golang-install/master/install.sh | bash /dev/stdin -v MY_DIY_GO_VERSION -d MY_DIY_GO_PATH

Offline

Save the script as a file name install.sh

# default install
$ bash install.sh   
   
# customize  
$ bash install.sh -v 1.12.8 -d /home/myhome/go 

When you add executable permissions, you can customize the version and gopath.

# add executable
$ chmod +x install.sh

# default install
$ ./install.sh

# customize 
$ ./install.sh -v 1.12.8 -d /home/myhome/go

Usage
./install.sh -h

Go install

Usage: ./install.sh [-h] [-v version] [-d gopath]

Options:
  -h            : this help
  -v            : set go version (default: latest version)
  -d            : set go path (default: ~/.go/path)

Author

Author: Skiychan
Email : [email protected]
Link : https://www.skiy.net

License

This project is licensed under the MIT license.

About

One key installation of the latest version of the golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%