go mod 使用
golang最被诟病的三个问题: module管理机制,泛型,错误处理 go mod就是用来解决module管理机制. 首先,把go的版本升级到1.12.x. 可以用go help mod看到go mod的子命令. Note that support for modules is built into all the go commands, not just 'go mod'. For example, day-to-day adding, removing, upgrading, and downgrading of dependencies should be done using 'go get'. See 'go help modules' for an overview of module functionality. Usage: go mod <command> [arguments] The commands are: download download modules to local cache edit edit go.mod from tools ...