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
@@ -9,6 +9,16 @@ import (
"github.com/jwetzell/showbridge-go/internal/config"
)
func init() {
RegisterProcessor(ProcessorRegistration{
Type: "json.encode",
Title: "Encode JSON",
New: func(config config.ProcessorConfig) (Processor, error) {
return &JsonEncode{config: config}, nil
},
})
}
type JsonEncode struct {
config config.ProcessorConfig
}
@@ -35,13 +45,3 @@ func (je *JsonEncode) Process(ctx context.Context, wrappedPayload common.Wrapped
func (je *JsonEncode) Type() string {
return je.config.Type
}
func init() {
RegisterProcessor(ProcessorRegistration{
Type: "json.encode",
Title: "Encode JSON",
New: func(config config.ProcessorConfig) (Processor, error) {
return &JsonEncode{config: config}, nil
},
})
}