Mac uses the Option+Command+L shortcut to quickly format the selected code block. If you want to enable automatic formatting of the code when the file is saved, you can add a Watcher
Click Goland -> Preferences -> Tools -> File Watchers, then add a go fmt tool, then click "Apply" and "OK", so that every time the file is saved, code formatting will be automatically triggered.







![[Developers must see] [push kit] Collection of typical problems of push service 2](/img/70/d5127d57d2f3532deb7314d737820b.png)
