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

Method loadedModules

cmd/dagger/shell_exec.go:1064–1076  ·  view source on GitHub ↗

loadedModules iterates over all loaded module definitions

(yield func(*moduleDef) bool)

Source from the content-addressed store, hash-verified

1062
1063// loadedModules iterates over all loaded module definitions
1064func (h *shellCallHandler) loadedModules(yield func(*moduleDef) bool) {
1065 h.modDefs.Range(func(key, val any) bool {
1066 if dgst, ok := key.(string); ok && dgst != "" {
1067 // ignore modules that aren't fully loaded yet
1068 if def, ok := val.(*moduleDef); ok && def.HasModule() {
1069 if !yield(def) {
1070 return false
1071 }
1072 }
1073 }
1074 return true
1075 })
1076}
1077
1078// HandlerCtx returns interp.HandlerContext value stored in ctx, or nil if
1079// it doesn't have one.

Callers

nothing calls this directly

Calls 1

HasModuleMethod · 0.80

Tested by

no test coverage detected