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
require 

go mod 会默许拉取最新的relase tag,假如没有,便拉取最新的commit记载。并支撑版别操控。
indirect标明是直接引证。
留意:
if an old package and a new package have the same import path, the new package must be backwards compatible with the old package.
“假如旧软件包和新软件包具有相同的导入途径,则新软件包有必要与旧软件包向后兼容。”










菠菜首存-菠菜网-菠菜信誉导航