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

@ -36,10 +36,10 @@ var ListRoutesCmd = &cobra.Command{
routes, err := h.GetNodeRoutes(n, args[0])
if strings.HasPrefix(o, "json") {
jsonOutput(routes, err, o)
JsonOutput(routes, err, o)
return
}
if err != nil {
fmt.Println(err)
return
@ -71,7 +71,7 @@ var EnableRouteCmd = &cobra.Command{
}
route, err := h.EnableNodeRoute(n, args[0], args[1])
if strings.HasPrefix(o, "json") {
jsonOutput(route, err, o)
JsonOutput(route, err, o)
return
}