Hi Trig,
I'm new to the list and I'm a Go newbie, but
I guess it's because:
var (
a int,
b string,
...
)
is just a syntactical grouping, which var also be written as:
var a int
var b string
...
while
func (
func x() {
...
}
func y() {
...
}
)
would affect scope. In the above x() and y() would be local functions to an unnamed function. Defining the scope is what packages are for. I'd really love to see local functions, though, not for real scope usage but for clarity of coding.
Also, grouping functions inside func (...) wouldn't make sense because that'd only mean that you'd basically indent almost all of your code unnecessarily by one tab, or whatever you use.
Cheers,
Paul