duanlaofu4108 2018-07-30 09:01
浏览 547

goland重新格式化快捷方式(ctrl + alt + L)和go fmt有什么区别?

I always use goland's keyboard shortcut <kbd>ctrl</kbd>+<kbd>alt</kbd>+<kbd>L</kbd> (reformat code) to format my goland code. And when I use go fmt command,it still make some changes. So... What is differences between goland reformat(<kbd>ctrl</kbd>+<kbd>alt</kbd>+<kbd>l</kbd>) and go fmt?

  • 写回答

2条回答 默认 最新

  • doue1925 2018-07-30 09:10
    关注

    The builtin formatter, available via <kbd>ctrl</kbd>+<kbd>alt</kbd>+<kbd>L</kbd> (reformat code), is what the IDE implements in order to format the code. It currently (as of 2018.2) is not 100% on-par with gofmt so I recommend using gofmt before committing the files.

    As for the changes you mention in DVCS, you need to provide more details either here or on the issue tracker, in order to understand what's happening.

    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序