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

@@ -2,7 +2,7 @@ package main
import (
"fmt"
"os"
"log"
"time"
"github.com/onyx-and-iris/voicemeeter-api-go"
@@ -49,8 +49,7 @@ func (o observer) OnUpdate(subject string) {
func main() {
vm, err := voicemeeter.NewRemote("potato")
if err != nil {
fmt.Println(err)
os.Exit(1)
log.Fatal(err)
}
defer vm.Logout()