add error message if config not found

This commit is contained in:
onyx-and-iris 2022-09-18 20:57:59 +01:00
parent 73893209a1
commit a5f653f569

View File

@ -3,8 +3,8 @@ package main
import ( import (
"fmt" "fmt"
"log" "log"
"time"
"os" "os"
"time"
"github.com/onyx-and-iris/voicemeeter-api-go" "github.com/onyx-and-iris/voicemeeter-api-go"
@ -107,7 +107,8 @@ func obsConnect() (*goobs.Client, error) {
f := "config.toml" f := "config.toml"
if _, err := os.Stat(f); err != nil { if _, err := os.Stat(f); err != nil {
f = "./config.toml" err := fmt.Errorf("unable to locate %s", f)
return nil, err
} }
var c config var c config