Documentation
¶
Overview ¶
Package sparse provides the creation of sparse.Slice via sparse.NewSlice
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrItemNotFound is the error when we could not find an item ErrItemNotFound = errors.New("item not found") )
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator interface { // Next returns the next element Next() Iterator // Value returns the current item value Value() interface{} }
Iterator for sparse
type Slice ¶
type Slice interface { // Add a new item to the slice Add(ref interface{}) // Remove a item in the slice Remove(ref interface{}) error // Clear al the items in the slice Clear() // Size return the number of items in this slice Size() int // Iterator returns a new sparse.Iterator for sparse.Slice Iterator() Iterator }
Slice is an slice that contains interfaces and reuse slots
Click to show internal directories.
Click to hide internal directories.