diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-02-10 04:45:20 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-02-10 04:45:20 +0100 |
commit | 852a30ddffdc4b11829a430eaf37e00cbbe7207b (patch) | |
tree | 5d6936f08efb6316692a8b42d29d10e9017a365f /cmd | |
parent | make sure we don't miss events from mixer (diff) |
fix go vet errors
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/dolmetschctld/dolmetschctld.go | 6 | ||||
-rw-r--r-- | cmd/dolmetschctld/statemachine.go | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cmd/dolmetschctld/dolmetschctld.go b/cmd/dolmetschctld/dolmetschctld.go index dfbb47a..1df4efb 100644 --- a/cmd/dolmetschctld/dolmetschctld.go +++ b/cmd/dolmetschctld/dolmetschctld.go @@ -40,9 +40,9 @@ func addLanguage(sm *StateMachine, name Language, main, voice mixer.Channel) { func main() { log.Println("hello world.") - m, err := mixer.NewMixer(mixer.Config{"ESI MIDIMATE eX MIDI 2", "ESI MIDIMATE eX MIDI 1"}) + m, err := mixer.NewMixer(mixer.Config{DevIn: "ESI MIDIMATE eX MIDI 2", DevOut: "ESI MIDIMATE eX MIDI 1"}) if err != nil { - log.Println("Error opening the mixer: %v", err) + log.Printf("Error opening the mixer: %v", err) os.Exit(1) } defer m.Shutdown() @@ -52,7 +52,7 @@ func main() { log.Printf(" output: %s\t%s", m.DevOut.ID, m.DevOut.Name) if err = m.Init(); err != nil { - log.Println("Error initializeing the mixer: %v", err) + log.Printf("Error initializeing the mixer: %v", err) os.Exit(1) } log.Printf("mixer successfully initialized!") diff --git a/cmd/dolmetschctld/statemachine.go b/cmd/dolmetschctld/statemachine.go index d92965a..1961303 100644 --- a/cmd/dolmetschctld/statemachine.go +++ b/cmd/dolmetschctld/statemachine.go @@ -156,8 +156,8 @@ func (sm *StateMachine) AddLanguage(name Language, main, voice mixer.Channel) er return fmt.Errorf("language '%s' already exists", name) } for ch := range []mixer.Channel{main, voice} { - if l, exists := sm.languages[name]; exists { - return fmt.Errorf("mixer channel %v is already in use by language '%s'", ch, l) + if _, exists := sm.languages[name]; exists { + return fmt.Errorf("mixer channel %v is already in use by language '%s'", ch, name) } } |