MCPcopy
hub / github.com/duke-git/lancet / unsafeInvokeFunc

Function unsafeInvokeFunc

function/function.go:223–230  ·  view source on GitHub ↗
(fn any, args ...any)

Source from the content-addressed store, hash-verified

221}
222
223func unsafeInvokeFunc(fn any, args ...any) []reflect.Value {
224 fv := reflect.ValueOf(fn)
225 params := make([]reflect.Value, len(args))
226 for i, item := range args {
227 params[i] = reflect.ValueOf(item)
228 }
229 return fv.Call(params)
230}
231
232func mustBeFunction(function any) {
233 v := reflect.ValueOf(function)

Callers 4

AfterFunction · 0.85
BeforeFunction · 0.85
DelayFunction · 0.85
ScheduleFunction · 0.85

Calls 1

ValueOfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…