feat: allow formatting :report command output as json
This commit is contained in:
@@ -24,21 +24,21 @@ func CommandLimitClear(appName string, processType string) error {
|
||||
}
|
||||
|
||||
// CommandReport displays a resource report for one or more apps
|
||||
func CommandReport(appName string, infoFlag string) error {
|
||||
func CommandReport(appName string, format string, infoFlag string) error {
|
||||
if len(appName) == 0 {
|
||||
apps, err := common.DokkuApps()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, appName := range apps {
|
||||
if err := ReportSingleApp(appName, infoFlag); err != nil {
|
||||
if err := ReportSingleApp(appName, format, infoFlag); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
return ReportSingleApp(appName, infoFlag)
|
||||
return ReportSingleApp(appName, format, infoFlag)
|
||||
}
|
||||
|
||||
// CommandReserve implements resource:reserve
|
||||
|
||||
Reference in New Issue
Block a user