func waitForMockEvents(events *sconsify.Events) { for { select { case <-events.PlayUpdates(): case <-events.PauseUpdates(): case <-events.ReplayUpdates(): case <-events.ShutdownSpotifyUpdates(): events.ShutdownEngine() case <-events.SearchUpdates(): } } }