feat(main): Now running until receiving ctrl+c

This commit is contained in:
2025-08-05 18:40:55 +02:00
parent d0d8330191
commit 54a2ff2ba8
2 changed files with 7 additions and 2 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/midi-hid

View File

@@ -2,7 +2,8 @@ package main
import (
"log"
"time"
"os"
"os/signal"
"gitlab.com/gomidi/midi/v2"
)
@@ -23,5 +24,8 @@ func main() {
controllerList := must(config.Construct())
defer controllerList.Stop()
time.Sleep(time.Second * 20)
// wait for SIGINT
sigintChan := make(chan os.Signal, 1)
signal.Notify(sigintChan, os.Interrupt)
<-sigintChan
}