Documentation ¶
Overview ¶
Package list implements of a doubly link list in Go.
Index ¶
- type List
- func (l *List) Add(data string) *Node
- func (l *List) AddFront(data string) *Node
- func (l *List) AddSort(data string) *Node
- func (l *List) Find(data string) (*Node, error)
- func (l *List) FindReverse(data string) (*Node, error)
- func (l *List) Operate(f func(n *Node) error) error
- func (l *List) OperateReverse(f func(n *Node) error) error
- func (l *List) Remove(data string) (*Node, error)
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List struct { Count int // contains filtered or unexported fields }
List represents a list of nodes.
func (*List) FindReverse ¶
FindReverse traverses the list in the opposite direction looking for the specified data.
func (*List) Operate ¶
Operate accepts a function that takes a node and calls the specified function for every node found.
func (*List) OperateReverse ¶
OperateReverse accepts a function that takes a node and calls the specified function for every node found.
Click to show internal directories.
Click to hide internal directories.