feat: port checks and domains :report subcommands to golang

The bash :report implementations for the checks and domains plugins are replaced with a compiled golang binary that collects report keys in parallel and marshals json directly. The domains global report header now matches the shared renderer used by every other golang report, and its bats assertion is updated accordingly.
This commit is contained in:
Jose Diaz-Gonzalez
2026-07-07 06:43:31 -04:00
parent 5faabea3d4
commit 8d0c36bad6
24 changed files with 621 additions and 203 deletions

View File

@@ -0,0 +1,29 @@
package checks
import (
"errors"
"github.com/dokku/dokku/plugins/common"
)
// CommandReport displays a checks report for one or more apps
func CommandReport(appName string, format string, infoFlag string) error {
if len(appName) == 0 {
apps, err := common.DokkuApps()
if err != nil {
if errors.Is(err, common.NoAppsExist) {
common.LogWarn(err.Error())
return nil
}
return err
}
for _, appName := range apps {
if err := ReportSingleApp(appName, format, infoFlag); err != nil {
return err
}
}
return nil
}
return ReportSingleApp(appName, format, infoFlag)
}