mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-08-21 22:18:57 +00:00
move init functions to top of file
This commit is contained in:
@@ -10,6 +10,16 @@ import (
|
||||
"github.com/jwetzell/showbridge-go/internal/config"
|
||||
)
|
||||
|
||||
func init() {
|
||||
RegisterProcessor(ProcessorRegistration{
|
||||
Type: "osc.message.decode",
|
||||
Title: "Decode OSC Message",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &OSCMessageDecode{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
type OSCMessageDecode struct {
|
||||
config config.ProcessorConfig
|
||||
}
|
||||
@@ -45,13 +55,3 @@ func (omd *OSCMessageDecode) Process(ctx context.Context, wrappedPayload common.
|
||||
func (omd *OSCMessageDecode) Type() string {
|
||||
return omd.config.Type
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterProcessor(ProcessorRegistration{
|
||||
Type: "osc.message.decode",
|
||||
Title: "Decode OSC Message",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &OSCMessageDecode{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user