MCPcopy Create free account
hub / github.com/bufbuild/buf / ModuleSetTargetModules

Function ModuleSetTargetModules

private/bufpkg/bufmodule/module_set.go:104–109  ·  view source on GitHub ↗

ModuleSetTargetModules is a convenience function that returns the target Modules from a ModuleSet.

(moduleSet ModuleSet)

Source from the content-addressed store, hash-verified

102// ModuleSetTargetModules is a convenience function that returns the target Modules
103// from a ModuleSet.
104func ModuleSetTargetModules(moduleSet ModuleSet) []Module {
105 return xslices.Filter(
106 moduleSet.Modules(),
107 func(module Module) bool { return module.IsTarget() },
108 )
109}
110
111// ModuleSetNonTargetModules is a convenience function that returns the non-target Modules
112// from a ModuleSet.

Callers 5

runFunction · 0.92
ModuleSetTargetOpaqueIDsFunction · 0.85
ModuleSetToDAGFunction · 0.85

Calls 3

FilterMethod · 0.65
ModulesMethod · 0.65
IsTargetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…