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
gofmt -w x.go
with x.go:
package p
// aligned
var _ = T1{
a: x,
b: y,
cccccccccccccccccccc: z,
}
// not aligned
var _ = T2{
a: x,
b: y,
ccccccccccccccccccccc: z,
}
// aligned
var a = T3{
aaaaaaaaaaaaaaaaaaaa: x,
b: y,
c: z,
}
// still aligned
var a = T4{
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: x,
b: y,
c: z,
}
gofmt aligns "similarly sized" composite literal elements; it breaks the
grouping when an internal threshold is reached. This works fine for T1, T2, and T3. But
the algorithm is not working for T4.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: