mirror of
https://github.com/safing/portbase
synced 2025-09-02 10:40:39 +00:00
Merge pull request #36 from safing/feature/subsystems-print-groups
Print subsystem module group in addition to subsystem dep graph
This commit is contained in:
commit
04ba80d41a
1 changed files with 11 additions and 0 deletions
|
@ -101,6 +101,8 @@ func SetDatabaseKeySpace(keySpace string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func printGraph() {
|
func printGraph() {
|
||||||
|
fmt.Println("subsystems dependency graph:")
|
||||||
|
|
||||||
// unmark subsystems module
|
// unmark subsystems module
|
||||||
module.Disable()
|
module.Disable()
|
||||||
// mark roots
|
// mark roots
|
||||||
|
@ -111,6 +113,15 @@ func printGraph() {
|
||||||
for _, sub := range subsystems {
|
for _, sub := range subsystems {
|
||||||
printModuleGraph("", sub.module, true)
|
printModuleGraph("", sub.module, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Println("\nsubsystem module groups:")
|
||||||
|
_ = start() // no errors for what we need here
|
||||||
|
for _, sub := range subsystems {
|
||||||
|
fmt.Printf("├── %s\n", sub.Name)
|
||||||
|
for _, mod := range sub.Modules[1:] {
|
||||||
|
fmt.Printf("│ ├── %s\n", mod.Name)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func printModuleGraph(prefix string, module *modules.Module, root bool) {
|
func printModuleGraph(prefix string, module *modules.Module, root bool) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue