go mod使用

1.go mod 使用:

export GO111MODULE=on
export GOPROXY=https://goproxy.cn
go mod download


set GO111MODULE=on    //windows
export GO111MODULE=on //linux

go build -mod = vendor
GOFLAGS = -mod = vendor

说明:

代理地址:

https://goproxy.io
https://goproxy.cn
https://mirrors.aliyun.com/goproxy/
https://athens.azurefd.net

2.Goland go mod配置

https://goframe.org/prepare/gomodule
https://www.jianshu.com/p/6f58f050ceda
https://studygolang.com/articles/15212

相关链接

https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away
https://juejin.im/post/5c8e503a6fb9a070d878184a
https://www.cnblogs.com/wt11/p/11340386.html
https://lfoder.github.io/2019/02/26/Go-Modules-go-mod-Goland-IDE%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B/

你可能感兴趣的:(go mod使用)