Documentation
¶
Index ¶
- type Cmp
- type Slice
- func (s *Slice) AddSliceItem(item interface{}) []interface{}
- func (s *Slice) AddSliceSlice(slice []interface{}) []interface{}
- func (s *Slice) Del(val interface{})
- func (s *Slice) Get() []interface{}
- func (s *Slice) GetSliceCmp() Cmp
- func (s *Slice) Index(index int) interface{}
- func (s *Slice) Left() interface{}
- func (s *Slice) Len() int
- func (s *Slice) PopLeft() interface{}
- func (s *Slice) PopRight() interface{}
- func (s *Slice) Push(val interface{})
- func (s *Slice) Right() interface{}
- func (s *Slice) Set(slice []interface{})
- type StructDelete
- type StructPush
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmp ¶
type Cmp func(a interface{}, b interface{}) int
Cmp function, a < b -> -1, a == b -> 0, a > b -> 1
type Slice ¶
type Slice struct {
StructDelete StructDelete
StructPush StructPush
// contains filtered or unexported fields
}
Slice is a sorted array
func NewSlice ¶
func NewSlice(cmp Cmp, structDelete StructDelete, structPush StructPush) *Slice
NewSlice return a new slice
func (*Slice) AddSliceItem ¶
func (s *Slice) AddSliceItem(item interface{}) []interface{}
func (*Slice) AddSliceSlice ¶
func (s *Slice) AddSliceSlice(slice []interface{}) []interface{}
func (*Slice) GetSliceCmp ¶
type StructDelete ¶
type StructDelete func(a interface{})
type StructPush ¶
type StructPush func(a interface{})
Click to show internal directories.
Click to hide internal directories.