Golang1.8使用slice實現先進進出功能

package cache import ( "fmt" ) type lists struct { count int pop int last int index int list []int } func (l *lists) Add(i int) { l.list[l.last] = i l.last += 1
相關文章
相關標籤/搜索