We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
This is my Go quickstart.
$HOME/go
mkdir $HOME/go mkdir $HOME/go/work # this is where we store our Go code.
~/.profile
export GOROOT=$HOME/go/go export GOPATH=$HOME/go/work PATH="$HOME/bin:$HOME/.local/bin:$PATH:$GOROOT/bin"
Make sure to source ~/.profile to apply the changes.
source ~/.profile
cd $HOME/go wget https://storage.googleapis.com/golang/go1.9.1.linux-amd64.tar.gz
$HOME/go/go
$GOROOT
tar xzf go1.9.1.linux-amd64.tar.gz
You should now has $HOME/go/go directory.
go version
Now let's test our new Go to build Caddy web server.
go get github.com/mholt/caddy/caddy
You can find the newly built binary in $GOPATH/bin/caddy. For convenience, you can add $GOPATH/bin to your $PATH so you can just type caddy.
$GOPATH/bin/caddy
$GOPATH/bin
$PATH
caddy