This is from Golang.org http://golang.org/pkg/sort/
// By is the type of a "less" function that defines the ordering of its Planet arguments.
type By func(p1, p2 *Planet) bool
I've never seen this structure. How come func comes after type? And what is type here?
I've seen the following structures but
type aaaaaa interface { aaa() string }
type dfdfdf struct { }
Never seen like
type By func(p1, p2 *Planet) bool
How this is possible in Go? type can take other things than interface, struct keywords?
Thanks~!