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

相关文章: