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
Is it possible to disable or customize some gofmt rules?
May be it support some config file? Support for something like .gofmt_config in project folder would be perfect
I prefer to keep spaces around math symbols
a=perPage*(pageNumber+checkNextPageCount-1) +1records[len(records)-1]
// I like with spacesa=perPage* (pageNumber+checkNextPageCount-1) +1records[len(records) -1]
The text was updated successfully, but these errors were encountered:
It is an intentional design choice that there are no configuration options for gofmt. The benefit of eliminating bike shed discussion about formatting choices is considered to be more important than the cost of not permitting people to use their preferred style. The usual saying is that gofmt isn't anybody's preferred style, but it's adequate for everybody.
Thanks.
Every linting and formatting tool that I've used have configuration. So every team can choose their comfortable style and the use the tool to maintain it
The usual saying is that gofmt isn't anybody's preferred style, but it's adequate for everybody who still using it.
Well, as I say, this was an intentional choice. It's often said that Go is an opinionated language, and this is one of the opinions that it holds. https://go-proverbs.github.io/ .
Is it possible to disable or customize some
gofmt
rules?May be it support some config file? Support for something like
.gofmt_config
in project folder would be perfectI prefer to keep spaces around math symbols
The text was updated successfully, but these errors were encountered: