mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-08-19 21:23:57 +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.encode",
|
||||
Title: "Encode MIDI Message",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &MIDIMessageEncode{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
type MIDIMessageEncode struct {
|
||||
config config.ProcessorConfig
|
||||
}
|
||||
@@ -31,13 +41,3 @@ func (mme *MIDIMessageEncode) Process(ctx context.Context, wrappedPayload common
|
||||
func (mme *MIDIMessageEncode) Type() string {
|
||||
return mme.config.Type
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterProcessor(ProcessorRegistration{
|
||||
Type: "midi.message.encode",
|
||||
Title: "Encode MIDI Message",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &MIDIMessageEncode{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user