MCPcopy Index your code
hub / github.com/dagger/dagger / GetFunction

Method GetFunction

cmd/dagger/module_inspect.go:487–497  ·  view source on GitHub ↗
(fp functionProvider, functionName string)

Source from the content-addressed store, hash-verified

485}
486
487func (m *moduleDef) GetFunction(fp functionProvider, functionName string) (*modFunction, error) {
488 for _, fn := range fp.GetFunctions() {
489 if fn.Name == functionName || fn.CmdName() == functionName {
490 if err := m.LoadFunctionTypeDefs(fn); err != nil {
491 return nil, err
492 }
493 return fn, nil
494 }
495 }
496 return nil, fmt.Errorf("no function %q in type %q", functionName, fp.ProviderName())
497}
498
499// GetInterface retrieves a saved interface type definition from the module.
500func (m *moduleDef) GetInterface(name string) *modInterface {

Callers 6

GetObjectFunctionMethod · 0.95
GetMainFunctionMethod · 0.95
HasFunctionMethod · 0.95
lookupFieldMethod · 0.80
GetSupportedFunctionFunction · 0.80
registerCommandsMethod · 0.80

Calls 4

LoadFunctionTypeDefsMethod · 0.95
CmdNameMethod · 0.80
GetFunctionsMethod · 0.65
ProviderNameMethod · 0.65

Tested by

no test coverage detected