Fix mapping of default output type to json (#93)
diff --git a/cmd/output.go b/cmd/output.go
index 3279c8c..f221e03 100644
--- a/cmd/output.go
+++ b/cmd/output.go
@@ -254,6 +254,8 @@
printCsv(response, filter)
case config.TABLE:
printTable(response, filter)
+ case config.DEFAULT:
+ printJSON(response)
default:
fmt.Println("Invalid output type configured, please fix that!")
}
diff --git a/config/config.go b/config/config.go
index 0e7e78e..5141df6 100644
--- a/config/config.go
+++ b/config/config.go
@@ -40,6 +40,7 @@
JSON = "json"
TABLE = "table"
TEXT = "text"
+ DEFAULT= "default"
)
// ServerProfile describes a management server
@@ -75,7 +76,7 @@
}
func GetOutputFormats() []string {
- return []string {"column", "csv", "json", "table", "text"}
+ return []string {"column", "csv", "json", "table", "text", "default"}
}
func CheckIfValuePresent(dataset []string, element string) bool {