FAQ
# by default this will download all modules in go.mod
go mod download
# with golang 1.14, some modules are not compatible yet. please use this as temp solution.
go env -w GOPROXY=direct
go env -w GOSUMDB=off
go mod download
# If you are importing internal/private modules, use following setting with `go mod download`
GOPRIVATE=bitbucket.com/banzaicloud/*
go mod downloadmodule github.com/starkandwayne/my-go-project go 1.14 require ( github.com/fatih/color v1.7.0 // indirect github.com/mattn/go-colorable v0.1.2 // indirect ) replace github.com/fatih/color => github.com/drnic/fatih-color silly-changego get -u # to use the latest minor or patch releases go get -u=patch # to use the latest patch releases go mod tidy # to find out why you have specific dependency go mod why -m github.com/DATA-DOG/go-sqlmock # if you want to get binaries into $GOHOME/bin or $GOBIN GO111MODULE=off go get whatever # list modules go list -m allyarn global add commitizen cz-conventional-changelog echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc; # create .czrc cd non-node-git-repo touch foo git cz -arm go.sum go clean -modcache go mod download # this empties $GOPATH/pkg/mod/ go clean -cache -modcachego mod tidy go test all
Refer
Last updated
