You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt.Printf("%-30s | %-30s \n", "NetworkPolicy with endport", "✅")
419
+
table.Append([]string{"NetworkPolicy with endport", "✅", ""})
426
420
} else {
427
-
fmt.Printf("%-30s | %-30s \n", "NetworkPolicy with endport", "❌")
428
-
fmt.Println("Policies affected:")
421
+
table.Append([]string{"NetworkPolicy with endport", "❌", "Policies affected:"})
429
422
for_, policy:=rangeingressEndportNetworkPolicy {
430
423
policyNamespace:=strings.Split(policy, "/")[0]
431
424
policyName:=strings.Split(policy, "/")[1]
432
-
fmt.Printf("❌ Found NetworkPolicy: \033[31m%s\033[0m with ingress endPort field in namespace: \033[31m%s\033[0m\n", policyName, policyNamespace)
425
+
table.Append([]string{"", "❌", fmt.Sprintf("Found NetworkPolicy: \033[31m%s\033[0m with ingress endPort field in namespace: \033[31m%s\033[0m\n", policyName, policyNamespace)})
433
426
}
434
427
for_, policy:=rangeegressEndportNetworkPolicy {
435
428
policyNamespace:=strings.Split(policy, "/")[0]
436
429
policyName:=strings.Split(policy, "/")[1]
437
-
fmt.Printf("❌ Found NetworkPolicy: \033[31m%s\033[0m with engress endPort field in namespace: \033[31m%s\033[0m\n", policyName, policyNamespace)
430
+
table.Append([]string{"", "❌", fmt.Sprintf("Found NetworkPolicy: \033[31m%s\033[0m\n with egress endPort field in namespace: \033[31m%s\033[0m\n", policyName, policyNamespace)})
fmt.Printf("%-30s | %-30s \n", "NetworkPolicy with CIDR", "✅")
437
+
table.Append([]string{"NetworkPolicy with CIDR", "✅", ""})
445
438
} else {
446
-
fmt.Printf("%-30s | %-30s \n", "NetworkPolicy with CIDR", "❌")
447
-
fmt.Println("Policies affected:")
439
+
table.Append([]string{"NetworkPolicy with CIDR", "❌", "Policies affected:"})
448
440
for_, policy:=rangeingressPoliciesWithCIDR {
449
441
policyNamespace:=strings.Split(policy, "/")[0]
450
442
policyName:=strings.Split(policy, "/")[1]
451
-
fmt.Printf("❌ Found NetworkPolicy: \033[31m%s\033[0m with ingress CIDR field in namespace: \033[31m%s\033[0m\n", policyName, policyNamespace)
443
+
table.Append([]string{"", "❌", fmt.Sprintf("Found NetworkPolicy: \033[31m%s\033[0m with ingress CIDR field in namespace: \033[31m%s\033[0m\n", policyName, policyNamespace)})
452
444
}
453
445
for_, policy:=rangeegressPoliciesWithCIDR {
454
446
policyNamespace:=strings.Split(policy, "/")[0]
455
447
policyName:=strings.Split(policy, "/")[1]
456
-
fmt.Printf("❌ Found NetworkPolicy: \033[31m%s\033[0m with egress CIDR field in namespace: \033[31m%s\033[0m\n", policyName, policyNamespace)
448
+
table.Append([]string{"", "❌", fmt.Sprintf("Found NetworkPolicy: \033[31m%s\033[0m with egress CIDR field in namespace: \033[31m%s\033[0m\n", policyName, policyNamespace)})
fmt.Printf("%-30s | %-30s \n", "NetworkPolicy with egress", "✅")
455
+
table.Append([]string{"NetworkPolicy with egress (Not allow all egress)", "✅", ""})
464
456
} else {
465
-
fmt.Printf("%-30s | %-30s \n", "NetworkPolicy with egress", "❌")
466
-
fmt.Printf("%-30s | %-30s \n", "(Not allow all egress)", "")
467
-
fmt.Println("Policies affected:")
457
+
table.Append([]string{"NetworkPolicy with egress (Not allow all egress)", "❌", "Policies affected:"})
468
458
for_, policy:=rangeegressPolicies {
469
459
policyNamespace:=strings.Split(policy, "/")[0]
470
460
policyName:=strings.Split(policy, "/")[1]
471
-
fmt.Printf("❌ Found NetworkPolicy: \033[31m%s\033[0m with egress field (non-allow all) in namespace: \033[31m%s\033[0m\n", policyName, policyNamespace)
461
+
table.Append([]string{"", "❌", fmt.Sprintf("Found NetworkPolicy: \033[31m%s\033[0m with egress field (non-allow all) in namespace: \033[31m%s\033[0m\n", policyName, policyNamespace)})
0 commit comments