Skip to content

Commit f220cbf

Browse files
linter
Signed-off-by: Sarah Funkhouser <[email protected]>
1 parent fc32fcb commit f220cbf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/ent/hooks/onboarding.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import (
66
"strings"
77

88
"entgo.io/ent"
9+
"github.com/theopenlane/utils/keygen"
10+
911
"github.com/theopenlane/core/internal/ent/generated"
1012
"github.com/theopenlane/core/internal/ent/generated/hook"
1113
"github.com/theopenlane/core/internal/ent/generated/organization"
12-
"github.com/theopenlane/utils/keygen"
1314
)
1415

1516
// HookOnboarding runs on onboarding mutations to create the organization and settings
@@ -73,6 +74,7 @@ func createOrgUniqueName(ctx context.Context, m *generated.OnboardingMutation, i
7374
if exists {
7475
input.Name = uniqueOrganizationName(input.Name)
7576
attempt += 1
77+
7678
return createOrgUniqueName(ctx, m, input, attempt)
7779
}
7880

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

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

0 commit comments

Comments
 (0)