(ctx context.Context, printer indent.Printer, module bufmodule.Module)
| 74 | } |
| 75 | |
| 76 | func printModule(ctx context.Context, printer indent.Printer, module bufmodule.Module) error { |
| 77 | fileInfos, err := bufmodule.GetFileInfos(ctx, module) |
| 78 | if err != nil { |
| 79 | return err |
| 80 | } |
| 81 | moduleDeps, err := module.ModuleDeps() |
| 82 | if err != nil { |
| 83 | return err |
| 84 | } |
| 85 | printer.P("module:") |
| 86 | printer.In() |
| 87 | printer.Pf("name: %s", module.OpaqueID()) |
| 88 | printer.Pf("target: %v", module.IsTarget()) |
| 89 | printer.Pf("local: %v", module.IsLocal()) |
| 90 | printer.P("deps:") |
| 91 | printer.In() |
| 92 | for _, moduleDep := range moduleDeps { |
| 93 | printer.Pf("name:", moduleDep.OpaqueID()) |
| 94 | printer.Pf("direct: %v", moduleDep.IsDirect()) |
| 95 | } |
| 96 | printer.Out() |
| 97 | printer.P("files:") |
| 98 | printer.In() |
| 99 | for _, fileInfo := range fileInfos { |
| 100 | printer.Pf("%s:", fileInfo.Path()) |
| 101 | printer.In() |
| 102 | printer.Pf("target: %v", fileInfo.IsTargetFile()) |
| 103 | printer.Pf("external_path: %s", fileInfo.ExternalPath()) |
| 104 | printer.Out() |
| 105 | } |
| 106 | printer.Out() |
| 107 | printer.Out() |
| 108 | return nil |
| 109 | } |
no test coverage detected
searching dependent graphs…