1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-20 02:57:05 +00:00

chore: modernize range loops (#574)

Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
James Hillyerd
2025-05-31 12:57:47 -07:00
committed by GitHub
parent 8a1a01660c
commit f799e3debf
4 changed files with 17 additions and 20 deletions

View File

@@ -274,7 +274,7 @@ func parseEmailAddress(address string) (local string, domain string, err error)
inCharQuote := false
inStringQuote := false
LOOP:
for i := 0; i < len(address); i++ {
for i := range len(address) {
c := address[i]
switch {
case ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'):
@@ -380,7 +380,7 @@ func parseMailboxName(localPart string) (result string, err error) {
}
result = strings.ToLower(localPart)
invalid := make([]byte, 0, 10)
for i := 0; i < len(result); i++ {
for i := range len(result) {
c := result[i]
switch {
case 'a' <= c && c <= 'z':