MCPcopy Index your code
hub / github.com/0xAX/go-algorithms / Dequeue

Method Dequeue

queue/queue.go:65–75  ·  view source on GitHub ↗

Extracts first item from the Queue

()

Source from the content-addressed store, hash-verified

63
64// Extracts first item from the Queue
65func (queue *Queue) Dequeue() interface{} {
66 if (queue.depth > 0) {
67 item := queue.current.item
68 queue.current = queue.current.prev
69 queue.depth--
70
71 return item
72 }
73
74 return nil
75}

Callers 1

TestQueueFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestQueueFunction · 0.76