
go
不与天斗8866
理解了世间万物的人们,在他们的余生中,除了万圣节,不会再去思考其他东西
展开
-
MAC VSCode Go代码第一次运行配置
新建一个项目,创建main.go文件package mainfunc main() { print("hello world ")}右键->Run Code,运行该文件,提示如下[Running] cd "/Users/domino/VscodeGoProjects/go-redis-server-test/server/" && go run .go: cannot find main module, but found .git/config in /Users原创 2022-03-14 16:08:58 · 928 阅读 · 0 评论 -
VS code gopls requires a module at the root of your workspace
解决方法settings.json设置里面添加如下: "gopls": { "experimentalWorkspaceModule": true } 然后重新启动 vscode,可以发现package的引用报错就正常了参考 https://www.jianshu.com/p/fde21b198795转载 2022-03-14 15:55:35 · 563 阅读 · 0 评论