Goland 保存代码时自动格式化代码

File --> Settings --> Tools --> File Watchers --> +(Add) --> go fmt --> OK --> OK

原文地址:https://www.cnblogs.com/lijiejoy/p/15491695.html