I have implemented a binary heap data structure, my code is inside binary_heap.go in a package called binaryheap
This binaryheap package defines a struct, which has my binary heap implementation. How should I name this struct:
- Client
- Binary
- Heap
- Slice <- shows that I have implemented it using an underlying slice
- Tree <- shows that I have implemented it using an underlying tree
Any suggestions ? What is the idiomatic way ?
P.S.: another naming question: how should I name the following function:
func FilterNils(input []MyInterface) []MyInterface
As the name should say, it takes in a slice of elements, and returns another slice containing only the non nil elements.