Files
dokku/plugins/builder-lambda/subcommands.go
Jose Diaz-Gonzalez f9db9583a1 feat: port builder :report subcommands to golang
The bash :report implementations for the dockerfile, herokuish, lambda, nixpacks, pack, and railpack builders are replaced with a compiled golang binary that collects report keys in parallel and marshals json directly, avoiding the per-key subshell and jq forks that made the bash reports slow. The subcommands/report and root report trigger become symlinks to the compiled binary, while the non-report bash helpers each plugin still relies on are left in place.
2026-07-07 06:11:13 -04:00

30 lines
619 B
Go

package builderlambda
import (
"errors"
"github.com/dokku/dokku/plugins/common"
)
// CommandReport displays a builder-lambda 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)
}