错误概览
执行 go mod tidy 时,提示如下错误
> go mod tidy
github.com/myrepo/myproj imports
go.k6.io/k6 imports
go.k6.io/k6/cmd imports
github.com/fatih/color loaded from github.com/fatih/color@v1.12.0,
but go 1.16 would select v1.13.0
To upgrade to the versions selected by go 1.16:
go mod tidy -go=1.16 && go mod tidy -go=1.17
If reproducibility with go 1.16 is not needed:
go mod tidy -compat=1.17
For other options, see:
https://golang.org/doc/modules/pruning
网上的解决方案
解决办法:开发环境升级到 go1.18,这个是报错原因解释:go modules - go mod tidy error message:

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



