Feb 24
Why: kitex framework is using gofumpt as linter in gitlab CI, but goland defaults to use gofmt, which enforces weaker rules.

Procedure:

0. $ go install mvdan.cc/gofumpt@v0.2.0  # or any version as you need

1. Install file watcher plugin in goland settings;

2. Go to settings -> Tools -> File Watchers:

2.1. Click on "+", and choose "go fmt"

2.2. Replace "Program:" to be the full path of your gofumpt binary

2.3. Modify "Arguments:" to be "-w $FilePath$"

2.4 OK & OK again.
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]