Several questions about GOMODULE

1. If you are prompted that go.mod must write a tag, and you don't know which tag you want to import, or the warehouse does not have a tag. Then you can write v0.0.0

2. How to import a warehouse that only exists in mirrors

replace (
    golang.org/x/protobuf => github.com/golang/protobuf v0.0.0
)

3. How to automatically download the code of a private warehouse

export GOPRIVATE=git.<intranet>.com,<你的GOPROXY值>
export GOPROXY=         // 删除GOPROXY

Guess you like

Origin blog.csdn.net/fwhezfwhez/article/details/112490130