mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2024-11-22 12:50:53 +00:00
add error message if config not found
This commit is contained in:
parent
73893209a1
commit
a5f653f569
@ -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"
|
||||||
|
|
||||||
@ -92,12 +92,12 @@ func vmConnect() (*voicemeeter.Remote, error) {
|
|||||||
return vm, nil
|
return vm, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func obsConnect() (*goobs.Client, error) {
|
func obsConnect() (*goobs.Client, error) {
|
||||||
type (
|
type (
|
||||||
connection struct {
|
connection struct {
|
||||||
Host string
|
Host string
|
||||||
Port int
|
Port int
|
||||||
Password string
|
Password string
|
||||||
}
|
}
|
||||||
|
|
||||||
config struct {
|
config struct {
|
||||||
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user