golang使用github的包用go mod引入
1、配置mod文件
module test go 1.17 replace test.com/logx v0.0.1 => github.como/weiqiangxu/logx.git v0.0.1 require test.com/logx v0.0.1
2、配置 git 默认协议
git config --global url."git@test.com:".insteadOf "https://github.com/"
3、设置私有库
go env -w GOPRIVATE=github.com
4、go支持本地代码引入mod
replace code.tencent.net/backend/common => /Users/xuweiqiang/Documents/dofun/common
I can see a bigger world.