golang常用指令等

 

go env -w GO111MODULE=on
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct

export GOPROXY=https://mirrors.aliyun.com/goproxy/,direct

go mod init test
go get github.com/go-errors/errors
go get -d
go get -fix
# 清理旧的依赖缓存
go clean -modcache
# 整理依赖并编译
go mod tidy
go run main.go

点赞