diff --git a/cmd/RolesGenerator/main.go b/cmd/RolesGenerator/main.go index ed990f4..24b7f60 100644 --- a/cmd/RolesGenerator/main.go +++ b/cmd/RolesGenerator/main.go @@ -92,9 +92,9 @@ func main() { // Build role collapse function outBuilder.WriteString( - `func CollapseRolesIntoOne(roles ...*Role) Role { - startingRole := RoleDeepCopy(&DefaultUserRole) - slices.SortFunc(roles, func(a, b *Role) int { return int(int64(a.Priority)-int64(b.Priority)) }) + `func CollapseRolesIntoOne(roles ...Role) Role { + startingRole := RoleDeepCopy(DefaultUserRole) + slices.SortFunc(roles, func(a, b Role) int { return int(int64(a.Priority)-int64(b.Priority)) }) for _, role := range roles { `) // Write all the stupid conditions here @@ -119,7 +119,7 @@ func main() { `) // Then build the deep copy function - outBuilder.WriteString("\nfunc RoleDeepCopy(o *Role) Role {\n") + outBuilder.WriteString("\nfunc RoleDeepCopy(o Role) Role {\n") outBuilder.WriteString(` n := Role{} n.Model = o.Model n.Name = o.Name