[#1012] cli: Fix messages for list commands
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 1m8s
DCO action / DCO (pull_request) Successful in 2m41s
Build / Build Components (1.20) (pull_request) Successful in 4m25s
Build / Build Components (1.21) (pull_request) Successful in 4m46s
Tests and linters / Lint (pull_request) Successful in 6m22s
Tests and linters / Staticcheck (pull_request) Successful in 6m6s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m24s
Tests and linters / Tests with -race (pull_request) Successful in 8m28s
Tests and linters / Tests (1.21) (pull_request) Successful in 8m45s
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 1m8s
DCO action / DCO (pull_request) Successful in 2m41s
Build / Build Components (1.20) (pull_request) Successful in 4m25s
Build / Build Components (1.21) (pull_request) Successful in 4m46s
Tests and linters / Lint (pull_request) Successful in 6m22s
Tests and linters / Staticcheck (pull_request) Successful in 6m6s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m24s
Tests and linters / Tests with -race (pull_request) Successful in 8m28s
Tests and linters / Tests (1.21) (pull_request) Successful in 8m45s
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
abea258b65
commit
303aa0b79e
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