本文介绍了如何在保存时在Visual Studio代码中运行`go fmt`?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何让Visual Studio代码(或Go编程语言扩展)在保存时运行 go fmt
(或其他工具/命令)?甚至自动保存?
How to make Visual Studio Code (or Go Programming Language Extension) to run go fmt
(or other tools/commands) on save? Even auto save?
更新:
此时,它正在VSCode内完美工作;只需要在 .vscode 目录中添加一些配置文件(我使用)。
Update:It is working now perfectly inside VSCode, at this time; just need to add some config files inside .vscode directory (I use these).
推荐答案
目前尚不可能,但它正在处理
Its not possible at the moment but its being worked on https://github.com/Microsoft/vscode-go/issues/14
这篇关于如何在保存时在Visual Studio代码中运行`go fmt`?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!