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

Method DependenciesForModule

modules/modules.go:268–280  ·  view source on GitHub ↗

DependenciesForModule returns transitive dependencies for given module, sorted by name.

(module string)

Source from the content-addressed store, hash-verified

266
267// DependenciesForModule returns transitive dependencies for given module, sorted by name.
268func (m *Manager) DependenciesForModule(module string) []string {
269 dedup := map[string]bool{}
270 for _, d := range m.listDeps(module) {
271 dedup[d] = true
272 }
273
274 result := make([]string, 0, len(dedup))
275 for d := range dedup {
276 result = append(result, d)
277 }
278 sort.Strings(result)
279 return result
280}

Callers 4

AddDependencyMethod · 0.95
initModuleMethod · 0.95

Calls 1

listDepsMethod · 0.95

Tested by 1