为什么 vscode 在保存时删除了 golang 脚本
Why vscode removes golang script when doing save
当我想保存我的 golang 项目时遇到了麻烦,当我想导入“fmt”然后保存“fmt”脚本时它消失了。那我该如何解决呢
setting.json (vscode) :
{
"workbench.startupEditor" : "newUntitledFile",
"workbench.iconTheme" : "vscode-icons",
"security.workspace.trust.untrustedFiles": "open",
"editor.suggestSelection" : "first",
"vsintelllicode.modify.editor.suggestSelection":"automatically",
"workbench.colorTheme":"Material Theme Ocean",
"vsicons.dontShowNewVersionMessage":"true"
}
您通常不需要手动添加导入。写fmt.Println(1)
,看看它是否保留。
当我想保存我的 golang 项目时遇到了麻烦,当我想导入“fmt”然后保存“fmt”脚本时它消失了。那我该如何解决呢
setting.json (vscode) :
{
"workbench.startupEditor" : "newUntitledFile",
"workbench.iconTheme" : "vscode-icons",
"security.workspace.trust.untrustedFiles": "open",
"editor.suggestSelection" : "first",
"vsintelllicode.modify.editor.suggestSelection":"automatically",
"workbench.colorTheme":"Material Theme Ocean",
"vsicons.dontShowNewVersionMessage":"true"
}
您通常不需要手动添加导入。写fmt.Println(1)
,看看它是否保留。