go modules包管理

时间: 2019-12-08 07:30编辑:admin

go111module =off 只会从gopath中寻觅依靠包。

 download download modules to local cache
 edit edit go.mod from tools or scripts
 graph print module requirement graph
 init initialize new module in current directory
 tidy add missing and remove unused modules
 vendor make vendored copy of dependencies
 verify verify dependencies have expected content
 why explain why packages or modules are needed

module server
go 1.12

go mod 会默许拉取最新的relase tag,假如没有,便拉取最新的commit记载。并支撑版别操控。
if an old package and a new package have the same import path, the new package must be backwards compatible with the old package.