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

Struct FactorySpec

value_spec.go:39–41  ·  view source on GitHub ↗

FactorySpec materializes a value by running a Context-aware factory.

Source from the content-addressed store, hash-verified

37
38// FactorySpec materializes a value by running a Context-aware factory.
39type FactorySpec struct {
40 Factory func(ctx *Context) (*Value, error)
41}
42
43func (s FactorySpec) Materialize(ctx *Context) (*Value, error) {
44 if s.Factory == nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected