-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
Milestone
Description
This is a proposal to add functionality to gofmt for formatting/alignment of multiple struct tags. If gofmt could align the tags it would become much more readable and save allot of time from having to do it manually.
example: ( just some tags I use, could be many others )
type User struct {
Name string `json:"name" bson:"name" validate:"required"`
LegalName string `json:"legalName" bson:"legalName" validate:"required"`
Email string `json:"email" bson:"email" validate:"required"`
....
}after gofmt:
type User struct {
Name string `json:"name" bson:"name" validate:"required"`
LegalName string `json:"legalName" bson:"legalName" validate:"required"`
Email string `json:"email" bson:"email" validate:"required"`
...
}fortytw2, c2h5oh, uhpewpewpew, ondrajz and piotrrojek0xmohit, adg and dsnet