运行air报错解决方案

报错信息:go: cannot find main module, but found .git/config in /Users/zouzeyu/go/src/github.com/xxx/goblog
to create a module there, run:
go mod init

解决方法:由错误可以看出,是缺少go.mod文件导致的。可以在goblog文件夹下运行go mod init 来解决这个报错

空舟湖上~      ——Jouzeyu
lochpure
讨论数量: 1

可悲, 没有一个人回答。

2年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!