3 ms·
Fantastic article. Two tips about the pain points regarding unused imports and variables: The program goimports is an extended version of gofmt that will auto
by dilap 12y ago
Fantastic article.
Two tips about the pain points regarding unused imports and variables:
The program goimports is an extended version of gofmt that will automatically add and remove imports. Bind it to a keystroke of your editor of choice, and the imports situation becomes painless.
For unused variables, you can do "_ = someVar" to stop it from being flagged as unused. Still a bit of a pain, but much easier than commenting and uncommenting things all the time.