Use JsonOutput in version too
This commit is contained in:
parent
9eaac71762
commit
8ad366f977
6 changed files with 14 additions and 30 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue