1、缩进使用 go fmt和goimports 工具格式化 点击编辑,勾选红色区域 注:go fmt操作和goimports 是一样,一般推荐开启goimports (个人还是习惯ctrl+alt+L)