You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the format task runs gofmt and ptimports. The latter was a tool developed when godeps was still common and we wanted better import sorting.
With the vendor paradigm now being part of official/standard Go, there isn't much of a need to optimize godeps imports. Besides that, ptimports does the following:
Always converts imports to block form
Performs goimports spacing and also adds another block where project imports are placed
Although these are nice, I'm not sure that the marginal utility provided by these actions outweighs the benefits of using formatting that is more standard in the Go community. If gödel used gofmt or goimports by default, there would be far more repositories on which adding gödel and running the format task would not immediately modify most files.
Now that a plugin architecture exists, if a project really wants to run ptimports, they can add it as a plugin and do so. I think that also makes a strong case for switching the default format task to something more standard.
The text was updated successfully, but these errors were encountered:
Currently, the
format
task runsgofmt
andptimports
. The latter was a tool developed whengodeps
was still common and we wanted better import sorting.With the
vendor
paradigm now being part of official/standard Go, there isn't much of a need to optimizegodeps
imports. Besides that,ptimports
does the following:goimports
spacing and also adds another block where project imports are placedAlthough these are nice, I'm not sure that the marginal utility provided by these actions outweighs the benefits of using formatting that is more standard in the Go community. If gödel used
gofmt
orgoimports
by default, there would be far more repositories on which adding gödel and running theformat
task would not immediately modify most files.Now that a plugin architecture exists, if a project really wants to run
ptimports
, they can add it as a plugin and do so. I think that also makes a strong case for switching the default format task to something more standard.The text was updated successfully, but these errors were encountered: