move init functions to top of file

This commit is contained in:
Joel Wetzell
2026-05-22 17:45:03 -05:00
parent fb3c775765
commit 4323a21015
67 changed files with 1706 additions and 1706 deletions
+10 -10
View File
@@ -14,6 +14,16 @@ type OSCMessageEncode struct {
config config.ProcessorConfig
}
func init() {
RegisterProcessor(ProcessorRegistration{
Type: "osc.message.encode",
Title: "Encode OSC Message",
New: func(config config.ProcessorConfig) (Processor, error) {
return &OSCMessageEncode{config: config}, nil
},
})
}
func (ome *OSCMessageEncode) Process(ctx context.Context, wrappedPayload common.WrappedPayload) (common.WrappedPayload, error) {
payload := wrappedPayload.Payload
payloadMessage, ok := common.GetAnyAs[*osc.OSCMessage](payload)
@@ -35,13 +45,3 @@ func (ome *OSCMessageEncode) Process(ctx context.Context, wrappedPayload common.
func (ome *OSCMessageEncode) Type() string {
return ome.config.Type
}
func init() {
RegisterProcessor(ProcessorRegistration{
Type: "osc.message.encode",
Title: "Encode OSC Message",
New: func(config config.ProcessorConfig) (Processor, error) {
return &OSCMessageEncode{config: config}, nil
},
})
}