Documentation ¶
Index ¶
- Constants
- func FindInList(list list.List, search interface{}, comparator Comparator) (int, error)
- func FindInSlice(slice []interface{}, search interface{}, comparator Comparator) (int, error)
- func GetFromList(list list.List, index int) interface{}
- type Comparator
- type ErrDifferentType
- type ErrIndexOutOfRange
Constants ¶
View Source
const ( EQUAL int = iota SMALLER GREATER )
Variables ¶
This section is empty.
Functions ¶
func FindInList ¶
func FindInList(list list.List, search interface{}, comparator Comparator) (int, error)
func FindInSlice ¶
func FindInSlice(slice []interface{}, search interface{}, comparator Comparator) (int, error)
func GetFromList ¶
Types ¶
type Comparator ¶
func IntegerComparator ¶
func IntegerComparator() Comparator
func StringComparator ¶
func StringComparator() Comparator
type ErrDifferentType ¶
type ErrDifferentType struct {
// contains filtered or unexported fields
}
func (*ErrDifferentType) Error ¶
func (e *ErrDifferentType) Error() string
type ErrIndexOutOfRange ¶
type ErrIndexOutOfRange struct {
// contains filtered or unexported fields
}
func (*ErrIndexOutOfRange) Error ¶
func (e *ErrIndexOutOfRange) Error() string
Click to show internal directories.
Click to hide internal directories.