Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
Signed-off-by: Sarah Funkhouser <[email protected]>
  • Loading branch information
golanglemonade committed Feb 8, 2025
1 parent fc32fcb commit f220cbf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/ent/hooks/onboarding.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import (
"strings"

"entgo.io/ent"
"github.com/theopenlane/utils/keygen"

"github.com/theopenlane/core/internal/ent/generated"
"github.com/theopenlane/core/internal/ent/generated/hook"
"github.com/theopenlane/core/internal/ent/generated/organization"
"github.com/theopenlane/utils/keygen"
)

// HookOnboarding runs on onboarding mutations to create the organization and settings
Expand Down Expand Up @@ -73,6 +74,7 @@ func createOrgUniqueName(ctx context.Context, m *generated.OnboardingMutation, i
if exists {
input.Name = uniqueOrganizationName(input.Name)
attempt += 1

return createOrgUniqueName(ctx, m, input, attempt)
}

Expand All @@ -96,5 +98,5 @@ func uniqueOrganizationName(name string) string {
// replace spaces with dashes
name = strings.ReplaceAll(name, " ", "-")

return strings.ToLower(alphaNumericDashRegex.ReplaceAllString(name, "")) + "-" + keygen.AlphaNumeric(6)
return strings.ToLower(alphaNumericDashRegex.ReplaceAllString(name, "")) + "-" + keygen.AlphaNumeric(6) //nolint:mnd
}

0 comments on commit f220cbf

Please sign in to comment.