Skip to content

Commit

Permalink
Do not preallocate more than will be used
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-carvalho committed Jul 21, 2020
1 parent a89c851 commit 24fa8d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion william/william.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (w *WilliamAuth) Check(token, permission, resource string) (bool, error) {

func buildAllPermissions(region string, permissions []Permission, schedulers []models.Scheduler) []IAMPermission {
games := groupByGames(schedulers)
iamPermissions := make([]IAMPermission, 0, len(permissions)*len(schedulers))
iamPermissions := make([]IAMPermission, 0)
iamPermissions = append(iamPermissions, IAMPermission{
Prefix: "*",
Complete: false,
Expand Down

0 comments on commit 24fa8d1

Please sign in to comment.