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

+2 -2
View File
@@ -18,7 +18,7 @@ type Resource struct {
}
// ReportSingleApp is an internal function that displays the resource report for one or more apps
func ReportSingleApp(appName, infoFlag string) error {
func ReportSingleApp(appName, format, infoFlag string) error {
if err := common.VerifyAppName(appName); err != nil {
return err
}
@@ -41,7 +41,7 @@ func ReportSingleApp(appName, infoFlag string) error {
trimPrefix := true
uppercaseFirstCharacter := false
return common.ReportSingleApp("resource", appName, infoFlag, flags, flagKeys, trimPrefix, uppercaseFirstCharacter)
return common.ReportSingleApp("resource", appName, infoFlag, flags, flagKeys, format, trimPrefix, uppercaseFirstCharacter)
}
// GetResourceValue fetches a single value for a given app/process/request/key combination