minor simplification of authCanI code in resources collector

This commit is contained in:
Andrew Lavery
2020-01-10 15:03:47 -08:00
parent 2208b7672e
commit 26f3540d98

View File

@@ -457,11 +457,7 @@ func authCanI(client *kubernetes.Clientset, namespaces []string) (map[string][]b
continue
}
rules := []rbacv1.PolicyRule{}
for _, rule := range convertToPolicyRule(response.Status) {
rules = append(rules, rule)
}
rules := convertToPolicyRule(response.Status)
b, err := json.MarshalIndent(rules, "", " ")
if err != nil {
errorsByNamespace[namespace] = err.Error()