mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-08-22 22:38:58 +00:00
move init functions to top of file
This commit is contained in:
@@ -11,6 +11,16 @@ import (
|
||||
"gitlab.com/gomidi/midi/v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
RegisterProcessor(ProcessorRegistration{
|
||||
Type: "midi.message.decode",
|
||||
Title: "Decode MIDI Message",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &MIDIMessageDecode{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
type MIDIMessageDecode struct {
|
||||
config config.ProcessorConfig
|
||||
}
|
||||
@@ -33,13 +43,3 @@ func (mmd *MIDIMessageDecode) Process(ctx context.Context, wrappedPayload common
|
||||
func (mmd *MIDIMessageDecode) Type() string {
|
||||
return mmd.config.Type
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterProcessor(ProcessorRegistration{
|
||||
Type: "midi.message.decode",
|
||||
Title: "Decode MIDI Message",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &MIDIMessageDecode{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user