mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-27 05:15:47 +00:00
fix variable name
This commit is contained in:
@@ -13,7 +13,7 @@ type DebugJS struct {
|
|||||||
Program string
|
Program string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dl *DebugJS) Process(ctx context.Context, payload any) (any, error) {
|
func (dj *DebugJS) Process(ctx context.Context, payload any) (any, error) {
|
||||||
|
|
||||||
vm, err := quickjs.NewVM()
|
vm, err := quickjs.NewVM()
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ func (dl *DebugJS) Process(ctx context.Context, payload any) (any, error) {
|
|||||||
|
|
||||||
vm.SetProperty(vm.GlobalObject(), payloadAtom, payload)
|
vm.SetProperty(vm.GlobalObject(), payloadAtom, payload)
|
||||||
|
|
||||||
output, err := vm.Eval(dl.Program, quickjs.EvalGlobal)
|
output, err := vm.Eval(dj.Program, quickjs.EvalGlobal)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -37,8 +37,8 @@ func (dl *DebugJS) Process(ctx context.Context, payload any) (any, error) {
|
|||||||
return output, nil
|
return output, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dl *DebugJS) Type() string {
|
func (dj *DebugJS) Type() string {
|
||||||
return dl.config.Type
|
return dj.config.Type
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
Reference in New Issue
Block a user