how to install go newest version?
sudo apt-get install golang
install go 1.6 --- too old
https://www.golangtc.com/download
1.9
https://studygolang.com/dl
1.10
download 1.10 OK -- go1.10.linux-amd64.tar.gz
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
etc/profile add path
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
$home/.bashrc
export GOPATH=$HOME/go/goeg
$GOPATH/src/hello/hello.go
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
$ cd $GOPATH/src/hello
$ go build
$./hello
OK,install complete
sudo apt-get install golang
install go 1.6 --- too old
https://www.golangtc.com/download
1.9
https://studygolang.com/dl
1.10
download 1.10 OK -- go1.10.linux-amd64.tar.gz
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
etc/profile add path
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
$home/.bashrc
export GOPATH=$HOME/go/goeg
$GOPATH/src/hello/hello.go
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
$ cd $GOPATH/src/hello
$ go build
$./hello
OK,install complete