设置和下载
- 在go.mod中添加依赖的git地址和版本(commitid)
gitlab.com/groupName/projectName.git commitid - 在自己的代码中手动添加
gitlab.com/groupName/projectName.git,相关使用import gitlab.com/groupName/projectName func main() { projectName.Hello("World!") } - 设置:
$ git config --global url."https://username:password@gitlab.com/".insteadOf "https://gitlab.com/" - 使用
go mod下载相关依赖:$ go mod vendor
参考
https://segmentfault.com/a/1190000017973252