原因
go语言有个特性,当使用ide
工具去执行Go
源程序的时候,需要先对这个程序进行一个项目初始化才行
错误信息
Starting: C:\Users\Administrator\go\bin\dlv-dap.exe dap --check-go-version=false --listen=127.0.0.1:56539 from e:\BaiduNetdiskWorkspace\Code\xc\001\GoToinstall
DAP server listening at: 127.0.0.1:56539
Build Error: go build -o C:\Users\ADMINI~1\AppData\Local\Temp\__debug_bin151542831.exe -gcflags all=-N -l .
go: cannot find main module, but found .git/config in e:\BaiduNetdiskWorkspace\Code\xc\001\GoToinstall
to create a module there, run:
go mod init (exit status 1)