From 2b9e0d05819116ebebc7e3b1f0c07ba71bc7280f Mon Sep 17 00:00:00 2001 From: JBD Date: Fri, 8 Oct 2021 12:38:07 -0700 Subject: [PATCH] Fix style --- mk3/launchpad.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mk3/launchpad.go b/mk3/launchpad.go index c23036a..ac1db63 100644 --- a/mk3/launchpad.go +++ b/mk3/launchpad.go @@ -148,11 +148,12 @@ func discover() (input portmidi.DeviceID, output portmidi.DeviceID, err error) { } } } + + deviceIn := portmidi.DeviceID(in) + deviceOut := portmidi.DeviceID(out) if in == -1 || out == -1 { - err = errors.New("launchpad: no launchpad is connected") - } else { - input = portmidi.DeviceID(in) - output = portmidi.DeviceID(out) + return deviceIn, deviceOut, errors.New("launchpad: no launchpad is connected") } - return + + return deviceIn, deviceOut, nil }