Use JsonOutput in version too

This commit is contained in:
Juan Font Alonso 2021-05-08 17:06:36 +02:00
parent 9eaac71762
commit 8ad366f977
6 changed files with 14 additions and 30 deletions

View file

@ -30,7 +30,7 @@ var CreateNamespaceCmd = &cobra.Command{
}
namespace, err := h.CreateNamespace(args[0])
if strings.HasPrefix(o, "json") {
jsonOutput(namespace, err, o)
JsonOutput(namespace, err, o)
return
}
if err != nil {
@ -52,7 +52,7 @@ var ListNamespacesCmd = &cobra.Command{
}
namespaces, err := h.ListNamespaces()
if strings.HasPrefix(o, "json") {
jsonOutput(namespaces, err, o)
JsonOutput(namespaces, err, o)
return
}
if err != nil {