mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-08-11 09:23:39 +00:00
move init functions to top of file
This commit is contained in:
@@ -8,6 +8,16 @@ import (
|
||||
"github.com/jwetzell/showbridge-go/internal/config"
|
||||
)
|
||||
|
||||
func init() {
|
||||
RegisterProcessor(ProcessorRegistration{
|
||||
Type: "string.encode",
|
||||
Title: "Encode String",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &StringEncode{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
type StringEncode struct {
|
||||
config config.ProcessorConfig
|
||||
}
|
||||
@@ -29,13 +39,3 @@ func (se *StringEncode) Process(ctx context.Context, wrappedPayload common.Wrapp
|
||||
func (se *StringEncode) Type() string {
|
||||
return se.config.Type
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterProcessor(ProcessorRegistration{
|
||||
Type: "string.encode",
|
||||
Title: "Encode String",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &StringEncode{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user