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

@ -31,7 +31,7 @@ var ListPreAuthKeys = &cobra.Command{
}
keys, err := h.GetPreAuthKeys(n)
if strings.HasPrefix(o, "json") {
jsonOutput(keys, err, o)
JsonOutput(keys, err, o)
return
}
@ -85,7 +85,7 @@ var CreatePreAuthKeyCmd = &cobra.Command{
k, err := h.CreatePreAuthKey(n, reusable, expiration)
if strings.HasPrefix(o, "json") {
jsonOutput(k, err, o)
JsonOutput(k, err, o)
return
}
if err != nil {