code: func (q *Queue) resize() {
  	newBuf := make([]interface{}, q.count<<1)
  
  	if q.tail > q.head {
  		copy(newBuf, q.buf[q.head:q.tail])
  	} else {
  		n := copy(newBuf, q.buf[q.head:])
  		copy(newBuf[n:], q.buf[:q.tail])
  	}
  
  	q.head = 0
  	q.tail = q.count
  	q.buf = newBuf
  }
docs: // resizes the queue to fit exactly twice its current contents
  // this can result in shrinking if the queue is less than half-full