Documentation ¶ Index ¶ type DLink func NewDLink() *DLink func (l *DLink) AddNode(n int64) func (l *DLink) Cap() int64 func (l *DLink) DelNode(n int64) error func (l *DLink) Len() int64 func (l *DLink) Peek() any func (l *DLink) Pull() (v any) func (l *DLink) Push(value any) func (l *DLink) Range() (out []any) func (l *DLink) Size(size int64) error type Node Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type DLink ¶ type DLink struct { // 自动扩容 AutoLen bool // 返回被循环链表覆盖的值 OnCover func(value any) // contains filtered or unexported fields } func NewDLink ¶ func NewDLink() *DLink 双向循环链表 func (*DLink) AddNode ¶ func (l *DLink) AddNode(n int64) AddNode 扩容 func (*DLink) Cap ¶ func (l *DLink) Cap() int64 func (*DLink) DelNode ¶ func (l *DLink) DelNode(n int64) error DelNode 缩容 func (*DLink) Len ¶ func (l *DLink) Len() int64 func (*DLink) Peek ¶ func (l *DLink) Peek() any func (*DLink) Pull ¶ func (l *DLink) Pull() (v any) func (*DLink) Push ¶ func (l *DLink) Push(value any) func (*DLink) Range ¶ func (l *DLink) Range() (out []any) func (*DLink) Size ¶ func (l *DLink) Size(size int64) error type Node ¶ type Node struct { Value any // contains filtered or unexported fields } Source Files ¶ View all Source files link.go Click to show internal directories. Click to hide internal directories.