これは 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
この構造は見たことがありません。func が type の後に来るのはなぜですか? そして、ここでタイプとは何ですか?
私は次の構造を見てきましたが、
type aaaaaa interface { aaa() string }
type dfdfdf struct { }
のように見たことがない
type By func(p1, p2 *Planet) bool
これはGoでどのように可能ですか? type は、interface、struct キーワード以外のものを取ることができますか?
ありがとう~!