FAQ
Do you need both goimports and gofmt? I thought goimports was a super-set
of gofmt.
No, it is not.
And why not just let the plugin do the formatting? Does it not use the
same formatting as gofmt/goimports?
Because there are some differences on formatting (by default remove
trailing space, sort alphanumeric import, and so on).
We prefer use the go standard provided by gofmt/goimports for avoiding all
controversy and useless diff into commit.
And it is independent of IDE/text editor, that let's the choice of IDE/text
editor for others members of the team, as they have to use gofmt/goimport.


Le jeudi 17 septembre 2015 08:34:34 UTC+2, Tim K a écrit :


For me, the best is intellij with golang plugin plus filewatcher plugin
for gofmt and goimports. With this configuration, you have the auto gofmt
and goimports on each file save (as go vim and others) and that's work
wonderfully.

Do you need both goimports and gofmt? I thought goimports was a super-set
of gofmt.

And why not just let the plugin do the formatting? Does it not use the
same formatting as gofmt/goimports?
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

People

Translate

site design / logo © 2022 Grokbase