mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-27 05:15:47 +00:00
add convenience method for casting payloads
This commit is contained in:
@@ -17,7 +17,7 @@ type ScriptWASM struct {
|
||||
|
||||
func (se *ScriptWASM) Process(ctx context.Context, payload any) (any, error) {
|
||||
|
||||
payloadBytes, ok := payload.([]byte)
|
||||
payloadBytes, ok := GetAnyAs[[]byte](payload)
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("script.wasm can only operator on byte array")
|
||||
|
||||
Reference in New Issue
Block a user