Skip to content

Glossary: Data Structures and Algorithms in Go

Interface

Also written: heap.Interface, sort.Interface

A set of methods a type must have. `heap.Interface` needs five: `Len`, `Less`, `Swap`, `Push` and `Pop`.

Where the book teaches it

Related terms

container/heapMethod