mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-08-14 19:03: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.decode",
|
||||
Title: "Decode String",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &StringDecode{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
type StringDecode struct {
|
||||
config config.ProcessorConfig
|
||||
}
|
||||
@@ -30,13 +40,3 @@ func (sd *StringDecode) Process(ctx context.Context, wrappedPayload common.Wrapp
|
||||
func (sd *StringDecode) Type() string {
|
||||
return sd.config.Type
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterProcessor(ProcessorRegistration{
|
||||
Type: "string.decode",
|
||||
Title: "Decode String",
|
||||
New: func(config config.ProcessorConfig) (Processor, error) {
|
||||
return &StringDecode{config: config}, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user