MCPcopy Create free account
hub / github.com/devld/go-drive / Call

Method Call

script/runtime.go:103–108  ·  view source on GitHub ↗

Call calls function with this VM. Call can NOT be executed concurrency

(ctx context.Context, fn string, args ...any)

Source from the content-addressed store, hash-verified

101
102// Call calls function with this VM. Call can NOT be executed concurrency
103func (v *VM) Call(ctx context.Context, fn string, args ...any) (value *Value, e error) {
104 return wrapVmRun(ctx, v, func() (otto.Value, error) {
105 a, b := v.o.Call(fn, nil, args...)
106 return a, b
107 })
108}
109
110func (v *VM) GetValue(prop string) (value *Value, e error) {
111 vv, e := v.o.Get(prop)

Callers 8

ProgressMethod · 0.45
TotalMethod · 0.45
EncodeJSONValueMethod · 0.45
DecodeJSONValueMethod · 0.45
callMethod · 0.45
newScriptDriveFunction · 0.45
initConfigFunction · 0.45
init_Function · 0.45

Calls 1

wrapVmRunFunction · 0.85

Tested by

no test coverage detected