MCPcopy Create free account
hub / github.com/buke/quickjs-go / detectModuleSource

Method detectModuleSource

context.go:82–87  ·  view source on GitHub ↗
(code string, codePtr *C.char)

Source from the content-addressed store, hash-verified

80}
81
82func (ctx *Context) detectModuleSource(code string, codePtr *C.char) bool {
83 if !mayContainModuleSyntax(code) || !ctx.hasValidRef() {
84 return false
85 }
86 return C.DetectModuleSourceWithProbe(ctx.ref, codePtr, C.size_t(len(code))) != 0
87}
88
89func (ctx *Context) initScheduler() {
90 ctx.jobQueue = make(chan func(*Context), defaultJobQueueSize)

Callers 2

EvalMethod · 0.95
LoadModuleMethod · 0.95

Calls 2

hasValidRefMethod · 0.95
mayContainModuleSyntaxFunction · 0.85

Tested by

no test coverage detected