MCPcopy Index your code
hub / github.com/arnauddri/algorithms / Push

Method Push

data-structures/queue/queue.go:43–51  ·  view source on GitHub ↗
(el interface{})

Source from the content-addressed store, hash-verified

41}
42
43func (q *Queue) Push(el interface{}) {
44 //q.lock.Lock()
45 //defer q.lock.Unlock()
46
47 q.queue = append(q.queue, el)
48 q.len++
49
50 return
51}
52
53func (q *Queue) Peek() interface{} {
54 q.lock.Lock()

Callers 1

TestNewFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestNewFunction · 0.36