Consider the following:
var _ = map[string]func() bool{
"Func": func() bool {
return false
},
}
On one line it's go fmt'd as func() bool{ and as func() bool { on the other line. Note the space between bool and {.
In the previous case, this is the syntax for a map literal, while the latter is a function declaration.
Perhaps we should always output a space after a type expression (e.g., func() bool or chan bool) that contains a space?
Consider the following:
On one line it's
go fmt'd asfunc() bool{and asfunc() bool {on the other line. Note the space betweenbooland{.In the previous case, this is the syntax for a map literal, while the latter is a function declaration.
Perhaps we should always output a space after a type expression (e.g.,
func() boolorchan bool) that contains a space?