func (bl *Blinkt) SetupExit() {
	signalChan := make(chan os.Signal, 1)
	signal.Notify(signalChan, os.Interrupt, syscall.SIGTERM)

	go func() {
		for range signalChan {
			log.Println("Blinkt: processing exit")
			bl.Cleanup()
		}
	}()
}
// SetupExit captures Interrupt and SIGTERM signals to handle program exit
SetupExit captures Interrupt and SIGTERM signals to handle program exit
// SetupExit captures Interrupt and SIGTERM signals to handle program exit
func (bl *Blinkt) SetupExit() {
	signalChan := make(chan os.Signal, 1)
	signal.Notify(signalChan, os.Interrupt, syscall.SIGTERM)
	go func() {
		for range signalChan {
			log.Println("Blinkt: processing exit")
			bl.Cleanup()
		}
	}()
}
func ( bl * Blinkt ) SetupExit ( ) { signalChan := make ( chan os . Signal , 1 ) signal . Notify ( signalChan , os . Interrupt , syscall . SIGTERM ) go func ( ) { for range signalChan { log . Println ( " " ) bl . Cleanup ( ) } } ( ) }
SetupExit captures Interrupt and SIGTERM signals to handle program exit
SetupExit captures Interrupt and SIGTERM signals to handle program exit