From d6463f955a89a7686764f1e922afdc162aa26c24 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Wed, 16 Dec 2020 10:09:35 +0800 Subject: [PATCH] fix(climc): use printObjectRecursive for PerformXxx calls Original +----------+-----------------------------------------------------------------------------------------------------+ | Field | Value | +----------+-----------------------------------------------------------------------------------------------------+ | forwards | [{"addr":"192.168.2.252","port":22,"proto":"tcp","proxy_addr":"10.168.222.196","proxy_port":33908}, | | | {"addr":"192.168.2.252","port":22,"proto":"tcp","proxy_addr":"10.168.222.196","proxy_port":45490}] | +----------+-----------------------------------------------------------------------------------------------------+ After +-----------------------+----------------+ | Field | Value | +-----------------------+----------------+ | forwards.0.addr | 192.168.2.252 | | forwards.0.port | 22 | | forwards.0.proto | tcp | | forwards.0.proxy_addr | 10.168.222.196 | | forwards.0.proxy_port | 33908 | | forwards.1.addr | 192.168.2.252 | | forwards.1.port | 22 | | forwards.1.proto | tcp | | forwards.1.proxy_addr | 10.168.222.196 | | forwards.1.proxy_port | 45490 | +-----------------------+----------------+ --- cmd/climc/shell/helper.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/climc/shell/helper.go b/cmd/climc/shell/helper.go index c0a688e6f1..dbf98b6756 100644 --- a/cmd/climc/shell/helper.go +++ b/cmd/climc/shell/helper.go @@ -325,7 +325,7 @@ func (cmd ResourceCmd) PerformWithKeyword(keyword, action string, args IPerformO if err != nil { return err } - printObject(ret) + printObjectRecursive(ret) return nil } cmd.Run(keyword, args, callback) @@ -342,7 +342,7 @@ func (cmd ResourceCmd) PerformClassWithKeyword(keyword, action string, args IOpt if err != nil { return err } - printObject(ret) + printObjectRecursive(ret) return nil } cmd.Run(keyword, args, callback) @@ -363,7 +363,7 @@ func (cmd ResourceCmd) PerformClass(action string, args IOpt) { if err != nil { return err } - printObject(ret) + printObjectRecursive(ret) return nil } cmd.Run(action, args, callback)