mirror of
https://gitee.com/johng/gf.git
synced 2024-12-04 21:28:22 +08:00
18 lines
233 B
Go
18 lines
233 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/g/container/gqueue"
|
|
"github.com/gogf/gf/g/test/gtest"
|
|
)
|
|
|
|
func main() {
|
|
max := 100
|
|
q := gqueue.New(max)
|
|
for i := 1; i < max; i++ {
|
|
q.Push(i)
|
|
}
|
|
q.Close()
|
|
gtest.Assert(q.Len(), 1)
|
|
|
|
}
|