move any helper methods to common and reuse for params getter

This commit is contained in:
Joel Wetzell
2026-03-10 18:14:30 -05:00
parent 65476d5ecc
commit 5a0f21bd64
36 changed files with 373 additions and 355 deletions

View File

@@ -6,6 +6,7 @@ import (
"fmt"
"strings"
"github.com/jwetzell/showbridge-go/internal/common"
"github.com/jwetzell/showbridge-go/internal/config"
)
@@ -15,7 +16,7 @@ type StringSplit struct {
}
func (ss *StringSplit) Process(ctx context.Context, payload any) (any, error) {
payloadString, ok := GetAnyAs[string](payload)
payloadString, ok := common.GetAnyAs[string](payload)
if !ok {
return nil, errors.New("string.split only accepts a string")