This is used by myself to learn, not for production.
sudo apt install golang-go
pre-commit install
# Install errcheck
#go get -u github.com/kisielk/errcheck # Did not resolve issue
sudo snap install errcheck # Worked.
# Install staticcheck
go install honnef.co/go/tools/cmd/staticcheck@latest
# Install goimports
go install golang.org/x/tools/cmd/goimports@latest
# Install gocyclo
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
# Install gocritic
go install -v github.com/go-critic/go-critic/cmd/gocritic@latest
# Install documentation viewer.
sudo apt install golang-golang-x-tools
# Colorize test output.
go install -v github.com/kyoh86/richgo
go get github.com/kyoh86/richgo
# Optional (if it says ... gostatic not found etc):
export GOPATH="$HOME/go"
export PATH=$PATH:$GOPATH/bin
go build -o out && ./out
clear && go test ./... -coverprofile=coverage.out
or with colour:
richgo test ./... -coverprofile=coverage.out
godoc -http=:6060
go mod tidy && go run .
- Explanations:
- Python:
- Go: