feat(main): Now running until receiving ctrl+c
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/midi-hid
|
8
main.go
8
main.go
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user