I\'ve built a simple queue in Go. It uses an internal slice to keep track of its elements. Elements are pushed onto the queue by appending to the slice. I\'d like to implement <
Did you try these?
Pop from queue
x, a = a[0], a[1:]
Pop from stack
x, a = a[len(a)-1], a[:len(a)-1]
Push
a = append(a, x)
From: https://code.google.com/p/go-wiki/wiki/SliceTricks