Golang的List遍历
mList := list.New()
for i := 0; i < 10; i++ {
mList.PushBack(time.Now().UnixNano())
}
for item := mList.Front();nil != item ;item = item.Next() {
fmt.Println(item.Value)
}
mList := list.New()
for i := 0; i < 10; i++ {
mList.PushBack(time.Now().UnixNano())
}
for item := mList.Front();nil != item ;item = item.Next() {
fmt.Println(item.Value)
}
本文标题:Golang的List遍历
本文链接:https://www.haomeiwen.com/subject/rhulbqtx.html
网友评论