feat: allow formatting :report command output as json

This commit is contained in:
Jose Diaz-Gonzalez committed 2021-02-01 22:23:30 -05:00
1 parent cc2f054e6a
commit 033b0952dd
34 files changed
+104 -58

No files matched your search

+3 -3
View File
@@ -123,21 +123,21 @@ func CommandRebuildall() error {
}
// CommandReport displays a network 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)
}
// CommandSet set or clear a network property for an app