use log.Fatal during setup procedures.

update readme example
This commit is contained in:
onyx-and-iris
2022-08-23 03:35:34 +01:00
parent 6fabc43998
commit 7a79555cb8
5 changed files with 14 additions and 15 deletions

View File

@@ -42,21 +42,24 @@ package main
import (
"fmt"
"log"
"github.com/onyx-and-iris/voicemeeter-api-go"
)
func main() {
kindId := "banana"
vm := voicemeeter.NewRemote(kindId)
vm, err := voicemeeter.NewRemote(kindId)
if err != nil {
log.Fatal(err)
}
defer vm.Logout()
vm.Login()
vm.Strip[0].SetLabel("rode podmic")
vm.Strip[0].SetMute(true)
fmt.Printf("Strip 0 (%s) mute was set to %v\n", vm.Strip[0].GetLabel(), vm.Strip[0].GetMute())
vm.Logout()
}
```