package
Version:
v0.0.0-...-f52cd5e
Opens a new window with list of versions in this module.
Published: Oct 31, 2014
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Queue
View the docs
Installation
$ go get github.com/domluna/container/queue
Example
import (
"github.com/domluna/container/queue"
)
func main() {
q := queue.New()
q.Push(1)
q.Push(2)
q.Push(3)
v := t.Pop() // v = 1
v := t.Pop() // v = 2
v := t.Pop() // v = 3
v := t.Pop() // v = nil
}
Documentation
¶
Queue is a queue data structure.
func (q *Queue) Pop() interface{}
Pop removes the element at the front of the queue.
func (q *Queue) Push(v interface{})
Push inserts an element into the queue.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.