go mod note...
setting on the pc :
# go mod
export GO111MODULE=on
export GOPROXY=https://mirrors.aliyun.com/goproxy/
export GO111MODULE=on
export GOPROXY=https://mirrors.aliyun.com/goproxy/
go mod:
1.初始化命令,将会生成go.mod文件
go mod init
<project>
2. tidy for update funciton:
go mod tidy
3.vendor,将依赖的包放入vendor目录中
go mod vendor
4.verify,校验依赖并查看是否有修改
go mod verify
example:
https://blog.csdn.net/hbshhb/article/details/94661385
https://www.jianshu.com/p/bbed916d16ea