cmd/mbf: package status dashboard

This displays package metadata with optional status from a report.
This commit is contained in:
mae
2026-03-04 22:50:58 -06:00
committed by Ophestra
parent e61628a34e
commit 1d5d063d6a
16 changed files with 1189 additions and 21 deletions

View File

@@ -17,25 +17,12 @@ func commandInfo(
args []string,
w io.Writer,
writeStatus bool,
reportPath string,
r *rosa.Report,
) (err error) {
if len(args) == 0 {
return errors.New("info requires at least 1 argument")
}
var r *rosa.Report
if reportPath != "" {
if r, err = rosa.OpenReport(reportPath); err != nil {
return err
}
defer func() {
if closeErr := r.Close(); err == nil {
err = closeErr
}
}()
defer r.HandleAccess(&err)()
}
// recovered by HandleAccess
mustPrintln := func(a ...any) {
if _, _err := fmt.Fprintln(w, a...); _err != nil {