// Peek returns a Value from the front of the queue and true without removing it
// if queue is not empty, otherwise returns nil and false.
Peek returns a Value from the front of the queue and true without removing it
if queue is not empty, otherwise returns nil and false.
// Peek returns a Value from the front of the queue and true without removing it // if queue is not empty otherwise returns nil and false .
func (fifo *FIFO) Peek() (interface{}, bool) {
	fifo.mu.Lock()
	defer fifo.mu.Unlock()
	if fifo.first == nil {
		return nil, false
	}
	return fifo.first.Value, true
}
func ( fifo * FIFO ) Peek ( ) ( interface { } , bool ) { fifo . mu . Lock ( ) defer fifo . mu . Unlock ( ) if fifo . first == nil { return nil , false } return fifo . first . Value , true }
Peek returns a Value from the front of the queue and true without removing it
if queue is not empty, otherwise returns nil and false.
Peek returns a Value from the front of the queue and true without removing it if queue is not empty otherwise returns nil and false .