今天开始学习go语言,记录它的报错过程
——题记
报错原因:误删文件导致代码报错
报错:no required module provides package xxx: go.mod file not found in current directory or any parent directory; see 'go help modules'(xxx是自己的文件名)
解决方法:go env -w GO111MODULE=auto
正确输出
以上就是我遇到这个问题的解决方案,希望可以帮到你哦(*^_^*)