See https://play.golang.org/p/uwG_GFPiU13.
I expected the literal to be reformatted like this:
package main
func main() {
_ = []struct{ a int }{
{
a: 1,
},
{
a: 2,
},
{
a: 3,
},
}
}
instead, it preserves the previous formatting.
package main
func main() {
_ = []struct{ a int }{
{
a: 1,
},
{
a: 2,
}, {
a: 3,
},
}
}
Is this intentional? Or does it make sense to keep the formatting of structs in the slice the same?
See https://play.golang.org/p/uwG_GFPiU13.
I expected the literal to be reformatted like this:
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?