func (q *Queue) Dequeue() Item {
	q.mutex.Lock()
	defer q.mutex.Unlock()

	if q.IsEmpty() {
		fmt.Println("the queue is empty")

		return nil
	}

	item := q.items[0]
	q.items = q.items[1:]

	return item
}
// Dequeue removes and returns the item at the front of the queue.
Dequeue removes and returns the item at the front of the queue.
// Dequeue removes and returns the item at the front of the queue .
func (q *Queue) Dequeue() Item {
	q.mutex.Lock()
	defer q.mutex.Unlock()
	if q.IsEmpty() {
		fmt.Println("the queue is empty")
		return nil
	}
	item := q.items[0]
	q.items = q.items[1:]
	return item
}
func ( q * Queue ) Dequeue ( ) Item { q . mutex . Lock ( ) defer q . mutex . Unlock ( ) if q . IsEmpty ( ) { fmt . Println ( " " ) return nil } item := q . items [ 0 ] q . items = q . items [ 1 : ] return item }
Dequeue removes and returns the item at the front of the queue.
Dequeue removes and returns the item at the front of the queue .