1.打开Goland
的preferences
2.搜素File Watchers
3.点击➕号,选择go fmt
,修改两个红色框内的值
修改前如图所示
将go fmt
改为gofmt
,在参数项添加-l -w -s
修改后如图所示
4.配置完成,顺便添加goimports
Goland 配置 gofmt
最新推荐文章于 2024-09-20 16:22:38 发布
1.打开Goland
的preferences
2.搜素File Watchers
3.点击➕号,选择go fmt
,修改两个红色框内的值
修改前如图所示
将go fmt
改为gofmt
,在参数项添加-l -w -s
修改后如图所示
4.配置完成,顺便添加goimports