Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/gofmt: slice of structs not consistently formatted #34582
instead, it preserves the previous formatting.
Is this intentional? Or does it make sense to keep the formatting of structs in the slice the same?
To make different styles fall to a single one in a single declaration, we would have to keep track of braces and their positions and then possibly go backwards and change token positions.
Up to Robert to decide to do it or not.
Thank you for working on this!
is applied in all cases. For example,
It is not obvious to me that the above literal gets reformatted into
What gets determined to be the consistent style? The only one I can think of is the style of the first element in the list gets applied to the subsequent elements.