参考: https://stackoverflow.com/questions/66894200/go-go-mod-file-not-found-in-current-directory-or-any-parent-directory-see-go https://golang.org/doc/tutorial/create-module go 版本: 进入项目目录:执行: go mod init example.com/greetings 进入 goland 重新运行代码