The question about Go Module

I don"t know if you have used the 1.11 Go Module.
like previous goalng.org packages (for well-known reasons), we can manage dependencies normally with some package management tools (dep, etc.) and can handle them manually.

but now I"m a little confused about using Go Module,. Initialize the original project:

go mod init
go build

will report an error

cannot find module for path golang.org/x/text/transform

is the reason why we can"t access it.

but now I can"t try a successful configuration, because module has a version of the configuration requirements, manual download replacement does not seem to be successful; and the dependency package is derived from an indirect reference to the incoming package.
if you replace it with replace, you will still query the source database. I don"t know why.

I wonder if the bosses have any correct practice?
Thank you.

Jun.01,2021

did look up the source. If the source no longer exists, you can use vendor mode to build your package go build-getmode=vendor xxx.go

.
Menu