Help us shape the future of Go! Take the 2026 Go Developer Survey

executor

package
v2.950.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallContext

type CallContext struct {
	goja.FunctionCall
	VM *goja.Runtime
}

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

func New

func New(target types.Target, file string) (*Executor, error)

func NewWithEntrypoint

func NewWithEntrypoint(content string) *Executor

func NewWithVM

func NewWithVM(vm *goja.Runtime) *Executor

func (*Executor) AddJSFuncs

func (e *Executor) AddJSFuncs(funcs map[string]func(call CallContext) goja.Value) error

func (*Executor) Run

func (e *Executor) Run(fnName string, args ...any) (any, error)

func (*Executor) ToValue

func (e *Executor) ToValue(i any) goja.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL