brew install mercurial
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
gvm install go
or brew install go
Preferred Tool: Go Modules -- go mod
How to Use:
go mod init
Preferred Tool: Cobra
go build
Preferred Tool: Go Test
Additional Tools:
- stretchr/testify: easy test assertions
Documentations:
Preferred Tool: Visual Studio Code
Follow this guideline: https://github.com/Microsoft/vscode-go/wiki/Go-tools-that-the-Go-extension-depends-on
go get -u -v github.com/mdempsky/gocode
go get -u -v github.com/ramya-rao-a/go-outline
go get -u -v github.com/acroca/go-symbols
go get -u -v github.com/rogpeppe/godef
go get -u -v golang.org/x/tools/cmd/godoc
go get -u -v github.com/zmb3/gogetdoc
go get -u -v golang.org/x/lint/golint
go get -u -v github.com/fatih/gomodifytags
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/goimports
go get -u -v github.com/cweill/gotests/...
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/josharian/impl
go get -u -v github.com/haya14busa/goplay/cmd/goplay
go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs
go get -u -v github.com/davidrjenni/reftools/cmd/fillstruct
go get -u -v github.com/alecthomas/gometalinter
gometalinter --install
Package | Usage | How to Install |
---|---|---|
gocode | auto-completion | go get -u github.com/mdempsky/gocode |
go-outline | symbol search in the current file | go get -u github.com/ramya-rao-a/go-outline |
go-symbols | symbol search in the workspace | go get -u github.com/newhook/go-symbols |
gopkgs | auto-completion of unimported packages | go get -u github.com/uudashr/gopkgs/cmd/gopkgs |
gogetdoc | Go to symbol Definition or display documentation on hover | go get -u https://github.com/zmb3/gogetdoc |
golangci-lint | linting in Go | go get -u github.com/golangci/golangci-lint/cmd/golangci-lint |
dlv | debugging | go get -u github.com/go-delve/delve/cmd/dlv |