我裂開,一波未平一波又起...
按照MS教程上填寫
package main import "fmt" func main() { fmt.Println("Hello World!") }

然后無腦搜索教程,其中修改了launch.json無濟於事,按理來說新手入門的話應該VSC的配置文件是不需要修改的。
翻了下文檔,發現是 跳 過 新 手 教 程 的 錯 誤 玩 法
在新建新GO項目后,要在當前文件夾執行
go mod init {項目名}
然后進入項目文件夾,執行
go build
最后回到VSC運行提示:
Hello World!
Process exiting with code: 0
完事
