[#1012] cli: Fix messages for list commands #1013
2 changed files with 4 additions and 3 deletions
|
@ -69,9 +69,10 @@ func parseTarget(cmd *cobra.Command) *control.ChainTarget {
|
|||
func listRules(cmd *cobra.Command, _ []string) {
|
||||
pk := key.Get(cmd)
|
||||
|
||||
target := parseTarget(cmd)
|
||||
req := &control.ListChainLocalOverridesRequest{
|
||||
Body: &control.ListChainLocalOverridesRequest_Body{
|
||||
Target: parseTarget(cmd),
|
||||
Target: target,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -91,7 +92,7 @@ func listRules(cmd *cobra.Command, _ []string) {
|
|||
|
||||
chains := resp.GetBody().GetChains()
|
||||
if len(chains) == 0 {
|
||||
cmd.Println("Local overrides are not defined for the container.")
|
||||
cmd.Printf("Local overrides are not defined for the %s.\n", strings.ToLower(target.GetType().String()))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ func listTargets(cmd *cobra.Command, _ []string) {
|
|||
|
||||
targets := resp.GetBody().GetTargets()
|
||||
if len(targets) == 0 {
|
||||
cmd.Println("Local overrides are not defined for the container.")
|
||||
cmd.Println("Local overrides are not defined for any target.")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue