Skip to content

Commit

Permalink
Fixing cyclomatic complexity of isValidEmailUser.
Browse files Browse the repository at this point in the history
  • Loading branch information
cinar committed Jun 25, 2023
1 parent 20edd60 commit 47ced8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions email.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ func isValidEmailUser(user string) Result {
return ResultNotEmail
}

return isValidEmailUserCharacters(user)
}

// isValidEmailUserCharacters if the email user characters are valid.
func isValidEmailUserCharacters(user string) Result {
quoted := false
start := true
prev := ' '
Expand Down

0 comments on commit 47ced8d

Please sign in to comment.