// listen for an interrupt from the OS, then attempt engine cleanup
listen for an interrupt from the OS, then attempt engine cleanup
// listen for an interrupt from the OS then attempt engine cleanup
func trapExit(mockEngine engine.MockEngine, wg *sync.WaitGroup) {
	c := make(chan os.Signal)
	signal.Notify(c, os.Interrupt, syscall.SIGTERM)
	go func() {
		<-c
		println()
		mockEngine.StopImmediately(wg)
	}()
}
func trapExit ( mockEngine engine . MockEngine , wg * sync . WaitGroup ) { c := make ( chan os . Signal ) signal . Notify ( c , os . Interrupt , syscall . SIGTERM ) go func ( ) { <- c println ( ) mockEngine . StopImmediately ( wg ) } ( ) }
listen for an interrupt from the OS, then attempt engine cleanup
listen for an interrupt from the OS then attempt engine cleanup