MCPcopy
hub / github.com/grafana/dskit / inverseDependenciesForModule

Method inverseDependenciesForModule

modules/modules.go:251–265  ·  view source on GitHub ↗

inverseDependenciesForModule returns the list of modules depending on the input module, sorted by name.

(mod string)

Source from the content-addressed store, hash-verified

249
250// inverseDependenciesForModule returns the list of modules depending on the input module, sorted by name.
251func (m *Manager) inverseDependenciesForModule(mod string) []string {
252 result := []string(nil)
253
254 for n := range m.modules {
255 for _, d := range m.DependenciesForModule(n) {
256 if d == mod {
257 result = append(result, n)
258 break
259 }
260 }
261 }
262
263 sort.Strings(result)
264 return result
265}
266
267// DependenciesForModule returns transitive dependencies for given module, sorted by name.
268func (m *Manager) DependenciesForModule(module string) []string {

Callers 3

initModuleMethod · 0.95
TestDependenciesFunction · 0.95

Calls 1

DependenciesForModuleMethod · 0.95

Tested by 2

TestDependenciesFunction · 0.76