今天在调试一个golang项目时,从github上拉取项目,安照以往的步骤
git clone https://github.com/xxxx
cd xxxx
go mod tidy
但当
go mod tidy
拉取依赖包里报:
go mod tidy: go.mod file indicates go 1.17, but maximum supported version is 1.16
大概的意思是golang的版本太低了,于是就直接用
下载最新版本安装包后覆盖原来的版本
然后再运行
go mod tidy
就正常了