Go (also known as Golang) is
Google
a development of
static
strongly typed
, compiled, and hair, and has a garbage collection function of
the programming language
.
Robert Geruishimo (Robert Griesemer), Rob Pike (Rob Pike) and
Ken Thompson
(Ken Thompson) in September 2007 began to design Go, later Ian Lance Taylor, Russ Cox joined the project. Go is based on the
Inferno
operating system development. Go in November 2009 officially announced to become open-source project, and
Linux
and
Mac OS X
has been achieved on the platform, and later added the realization of a Windows system. In 2016, Go was evaluated software company TIOBE selected "TIOBE 2016 Best language." Currently, Go every six months to release a version two (ie upgrade from ax to ay).
1. Download go
- wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
2. Extract
- tar -C /usr/local -zxvf go1.13.linux-amd64.tar.gz
3. Set Environment Variables
- south you ~ / .profile
Add to
PATH=”$HOME/bin:$HOME/.local/bin:$PATH”
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$HOME/go/bin
Overload
- source ~/.profile
4. Create a home directory go to view the version
[root@localhost opt]# echo $HOME
/root
[root@localhost opt]# mkdir /root/go
[root@localhost opt]# go version
go version go1.13 linux/amd64