Member-only story

How to Fix File is not `gofumpt`-ed (gofumpt) error

gofumpt is golang linter. It’s a stricter version of gofmt.

The linter errors are hard to understand sometimes. One such error is that the File is not gofumpt-ed.

Solution

  1. Install gofumpt
  2. run gofumpt on the troubled files.
  3. gofumpt -w <fileame>
  4. If you still see an error, particularly on linter wsl, then its likely cause is an empty line at the beginning/end of a block (function, switch-case, etc)

--

--

Simplify Complexity
Simplify Complexity

Written by Simplify Complexity

Golang, Distributed Systems, File Systems, Python, C/C++, Linux

No responses yet