This is a type declaration.
The heap.Interface interface includes the sort.Interface interface.
You can see this as a form of inheritance / specialization: this means that structures that implement the heap.Interface interface heap.Interface defined as those that implement the sort.Interface methods and the Push and Pop methods.
Embedding the interface is described in Effective Go: http://golang.org/doc/effective_go.html#embedding
Denys seguret
source share