Skip to content

Commit

Permalink
chore: improve switch handling
Browse files Browse the repository at this point in the history
Co-authored-by: ccoVeille <[email protected]>
  • Loading branch information
ashwingopalsamy and ccoVeille authored Jan 11, 2025
1 parent 4c61ac2 commit 96537c9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions shortuuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ func NewV7WithNamespace(name string) string {
switch {
case name == "":
u = uuid.Must(uuid.NewV7())
case hasPrefixCaseInsensitive(name, "https://"):
u = hashedUUID(uuid.NameSpaceURL, name)
case hasPrefixCaseInsensitive(name, "http://"):
case hasPrefixCaseInsensitive(name, "https://"), hasPrefixCaseInsensitive(name, "http://"):
u = hashedUUID(uuid.NameSpaceURL, name)
default:
u = hashedUUID(uuid.NameSpaceDNS, name)
Expand Down

0 comments on commit 96537c9

Please sign in to comment.