forked from astaxie/gopkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb26aa3
commit dd09182
Showing
2 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# type Ring | ||
|
||
## 结构体代码: | ||
|
||
```go | ||
|
||
type Ring struct { | ||
next, prev *Ring | ||
Value interface{} | ||
} | ||
|
||
``` | ||
|
||
## 功能说明: | ||
|
||
环形双向链表 | ||
|
||
## 结构体字段: | ||
|
||
- `next *Ring`:指向链表中的下一个节点的指针 | ||
- `prev *Ring`:指向链表中的上一个节点的指针 | ||
- `Value interface{}`: 该节点中存储的内容,可以是任何对象 | ||
|
||
## 函数链表: | ||
|
||
- [func (r *Ring) Do(f func(interface{}))](Do.md) | ||
- [func (r *Ring) Len() int](Len.md) | ||
- [func (r *Ring) Link(s *Ring) *Ring](Link.md) | ||
- [func (r *Ring) Move(n int) *Ring](Move.md) | ||
- [func (r *Ring) Next() *Ring](Next.md) | ||
- [func (r *Ring) Prev() *Ring](Prev.md) | ||
- [func (r *Ring) Unlink(n int) *Ring](Unlink.md) |