转 https://cloud.tencent.com/developer/article/1970405
go work init ./xxx ./xx
go use ./xxxx
go.work 文件
使用use
go 1.18
use (
./hello_work
./gomodtestc
)
使用 replace
go 1.18
use (
./hello_work
)
replace (
github.com/georgehao/gomodtestc => "./gomodtestc"
)