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

Method LoadFunctionTypeDefs

cmd/dagger/module_inspect.go:677–691  ·  view source on GitHub ↗
(fn *modFunction)

Source from the content-addressed store, hash-verified

675}
676
677func (m *moduleDef) LoadFunctionTypeDefs(fn *modFunction) error {
678 if fn == nil {
679 return nil
680 }
681
682 if err := m.LoadTypeDef(fn.ReturnType); err != nil {
683 return fmt.Errorf("load return type for function %q: %w", fn.Name, err)
684 }
685 for _, arg := range fn.Args {
686 if err := m.LoadTypeDef(arg.TypeDef); err != nil {
687 return fmt.Errorf("load arg type for function %q arg %q: %w", fn.Name, arg.Name, err)
688 }
689 }
690 return nil
691}
692
693// modTypeDef is a representation of dagger.TypeDef.
694type modTypeDef struct {

Callers 3

loadTypeDefsMethod · 0.95
GetFunctionMethod · 0.95
GetSupportedFunctionsFunction · 0.80

Calls 1

LoadTypeDefMethod · 0.95

Tested by

no test coverage detected