mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-09-08 14:48:59 +00:00
move init functions to top of file
This commit is contained in:
@@ -12,6 +12,16 @@ import (
|
||||
"gitlab.com/gomidi/midi/v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
RegisterProcessor(ProcessorRegistration{
|
||||
Type: "midi.message.unpack",
|
||||
Title: "Unpack MIDI Message",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &MIDIMessageUnpack{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
type MIDIMessageUnpack struct {
|
||||
config config.ProcessorConfig
|
||||
}
|
||||
@@ -89,13 +99,3 @@ func (mmu *MIDIMessageUnpack) Process(ctx context.Context, wrappedPayload common
|
||||
func (mmu *MIDIMessageUnpack) Type() string {
|
||||
return mmu.config.Type
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterProcessor(ProcessorRegistration{
|
||||
Type: "midi.message.unpack",
|
||||
Title: "Unpack MIDI Message",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &MIDIMessageUnpack{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user