Implement a FIFO (First In, First Out) queue in Go that fulfills the functionality and requirements specified in the provided test cases. The implementation should be placed in the /app/ directory under a file named fifo.go.
The queue must support the following functionalities:
Adding items with the Add method.
Popping items with the Pop method, which should accept a callback function. If the callback returns an error of type ErrRequeue, the item should be requeued.
Updating an item with the Update method, which replaces the value associated with a given key.
Replacing multiple items with the Replace method, which replaces the entire contents of the queue with new items.
Checking item existence through Get and GetByKey methods.
Adding an item only if it is not already present using the AddIfNotPresent method.
Detecting line jumpers, ensuring that once an item is popped, it cannot be re-added to the front of the queue unless it is updated.
A method to check if the queue is synced with HasSynced, indicating whether changes have been made to the queue without being properly processed.
Properly handling closures, ensuring any blocking Pop calls unblock when the queue is closed through the Close method.
Ensure that your implementation passes all the test cases, specifically targeting the behavior outlined in each test. The interface for the FIFO should be carefully defined, allowing for concurrency and synchronization as demonstrated in the tests.
Important: declare your solution in package fifo (the test file uses package fifo, so the implementation must use the matching package name).