MCPcopy Create free account
hub / github.com/codnect/procyon / Definition

Method Definition

component/container.go:141–150  ·  view source on GitHub ↗

Definition retrieves the component definition associated with the given name. Returns the definition and a boolean indicating its existence.

(name string)

Source from the content-addressed store, hash-verified

139// Definition retrieves the component definition associated with the given name.
140// Returns the definition and a boolean indicating its existence.
141func (d *DefaultContainer) Definition(name string) (*Definition, bool) {
142 d.muDefinitions.RLock()
143 defer d.muDefinitions.RUnlock()
144
145 if def, exists := d.definitions[name]; exists {
146 return def, true
147 }
148
149 return nil, false
150}
151
152// ContainsDefinition checks whether a component definition with the specified name exists.
153func (d *DefaultContainer) ContainsDefinition(name string) bool {

Callers 2

ResolveMethod · 0.95

Calls

no outgoing calls

Tested by 1