return err from NewRemote\

pass Kind.Name to logout

update examples/tests to reflect changes
This commit is contained in:
onyx-and-iris
2022-08-23 03:16:43 +01:00
parent 3fd08ff606
commit 6fabc43998
6 changed files with 33 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
package voicemeeter_test
import (
"fmt"
"os"
"testing"
"time"
@@ -9,10 +10,16 @@ import (
)
var (
vm = voicemeeter.NewRemote("potato")
vm, err = voicemeeter.NewRemote("potato")
)
func TestMain(m *testing.M) {
if err != nil {
fmt.Println(err)
os.Exit(1)
}
defer vm.Logout()
vm.Login()
code := m.Run()
vm.Logout()