IDEA: Auto format code by gofmt.

Download File Watchers plugin, and configure it as follows:

idea_file_watcher_conf

Written on January 16, 2017