Powered by md-Blog  文 - 篇  访客 -

gin: go.mod file not found in current directory or any parent directory; see 'go help modules'


  分类:Go  / 
更新:2021-07-13 19:08:43  /  创建:2021-07-13 19:08:43
不要删除

Go 语言安装 Gin 框架,无法 run,报错:

no required module provides package github.com/gin-gonic/gin: go.mod file not found in current directory or any parent directory; see 'go help modules'

解决方法

go mod init gin
go mod edit -require github.com/gin-gonic/gin@latest
go mod vendor

不要删除

小站不易,感谢支持!