Using go1.5beta3.
This is obviously subjective, so feel free to close.
When struct definition is placed on a single line, it removes the space between the struct and {.
type Foo struct {
int
}
type Bar struct{ int }
When an anonymous struct is used and instantiated, it lacks a space before the { as well.
for _, x := range []struct {
b bool
n int
}{ // There is NO space between '}' and '{'
{false, 0},
{true, 2},
{false, 16},
} { // There IS a space between '}' and '{'
fmt.Println(x)
}
Using go1.5beta3.
This is obviously subjective, so feel free to close.
When struct definition is placed on a single line, it removes the space between the
structand{.When an anonymous struct is used and instantiated, it lacks a space before the
{as well.