Go getting started
From Golang installtion, code, tools, etc
install & configure
1 2
# extract sudo tar -xvzf go1.16.4.linux-amd64.tar.gz -C /usr/local/
export path
1 2 3
export GOROOT=/usr/local/go export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
packages/extension
For Text editors
gocode - autocompletion for Go in text editors
1
go get -u github.com/nsf/gocode
guru - a tool for answering questions about Go source code (for goclipse/Eclipse)
1
go get -u golang.org/x/tools/cmd/guru
For Visual Studio - analysis tools
1 2 3 4 5
go install -v github.com/ramya-rao-a/go-outline@latest go install -v golang.org/x/tools/gopls@latest go install -v github.com/go-delve/delve/cmd/dlv@latest go install -v honnef.co/go/tools/cmd/staticcheck@latest go install -v github.com/cweill/gotests@latest
1 2 3 4 5 6 7 8 9 10 11
go get -u github.com/uudashr/gopkgs/cmd/gopkgs go get -u github.com/ramya-rao-a/go-outline go get -u github.com/acroca/go-symbols go get -u golang.org/x/tools/cmd/guru go get -u golang.org/x/tools/cmd/gorename go get -u github.com/derekparker/delve/cmd/dlv go get -u github.com/stamblerre/gocode go get -u github.com/rogpeppe/godef go get -u github.com/ianthehat/godef go get -u github.com/sqs/goreturns go get -u golang.org/x/lint/golint
For Learning go
- tour - A Tour of Go (introduction to the Go programming language, offline)
- This will place a tour binary in your GOPATH’s bin directory
1 2 3 4
go install golang.org/x/website/tour@latest # run it $HOME/go/bin/tour
- tour - A Tour of Go (introduction to the Go programming language, offline)
This post is licensed under CC BY 4.0 by the author.