如何给旧版的go仓库,添加go1.12兼容

需要确认GOROOT在1.12以上,并且,GO111MODULE必须为on

go mod init github.com/****/projectName
go mod tidy

当出现依赖的第三方包版本不一致时。

修改go.mod,比如uuid包的某次hash,包path v0.0.0-时间-hash(12位)

module github.com/fwhezfwhez/errorx

go 1.12

require (
	github.com/fwhezfwhez/go-queue v0.0.0-20181018085741-6c0e1734beaa
	github.com/gin-gonic/gin v1.4.0
    github.com/satori/go.uuid v0.0.0-20180103174451-36e9d2ebbde5
)

你可能感兴趣的:(go)