1.Ctrl+s后自动格式化代码

File –> Settings Tools –> File Watchers –> + –> go fmt

2.快捷键设置

File –> Setting –> KeyMap