for issue 64 - a better response when no clusters are found when applying a policy
@@ -123,9 +123,13 @@ func applyPolicy(args []string) {
}
if response.Status.Code == msgs.Ok {
+ if len(response.Name) == 0 {
+ fmt.Println("no clusters found")
+ } else {
for _, v := range response.Name {
fmt.Println("applied policy on " + v)
}
+ }
} else {
fmt.Println(RED(response.Status.Msg))
os.Exit(2)
