mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-30 18:23:35 +08:00
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 |
+-----------------------+----------------+
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user