Skip to content

Commit

Permalink
fix: golangci-lint issue with non pre allocated array
Browse files Browse the repository at this point in the history
  • Loading branch information
leonsteinhaeuser committed Nov 15, 2023
1 parent f58b7cb commit 0421d73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controller/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
// }
// fmt.Println(rules) // [{Kind:ServiceAccount Name:foo Namespace:bar} {Kind:ServiceAccount Name:foo2 Namespace:bar2}]
func ParseRoleBindingSubjects(rulesStr string) ([]rbacv1.Subject, error) {
var subjects []rbacv1.Subject
subjects := []rbacv1.Subject{}
rules := strc.Array(rulesStr)
for roleIndex, rule := range rules {
subject := rbacv1.Subject{}
Expand Down

0 comments on commit 0421d73

Please sign in to comment.