feat: allow formatting :report command output as json
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// ReportSingleApp is an internal function that displays the network report for one or more apps
|
||||
func ReportSingleApp(appName, infoFlag string) error {
|
||||
func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -27,7 +27,7 @@ func ReportSingleApp(appName, infoFlag string) error {
|
||||
trimPrefix := false
|
||||
uppercaseFirstCharacter := true
|
||||
infoFlags := common.CollectReport(appName, infoFlag, flags)
|
||||
return common.ReportSingleApp("network", appName, infoFlag, infoFlags, flagKeys, trimPrefix, uppercaseFirstCharacter)
|
||||
return common.ReportSingleApp("network", appName, infoFlag, infoFlags, flagKeys, format, trimPrefix, uppercaseFirstCharacter)
|
||||
}
|
||||
|
||||
func reportBindAllInterfaces(appName string) string {
|
||||
|
||||
Reference in New Issue
Block a user