refactor: fix modernize lint issues (#5215)

This commit is contained in:
Oleksandr Redko
2026-03-07 17:10:19 +02:00
committed by GitHub
parent 017d71717f
commit c2454e7114
37 changed files with 152 additions and 152 deletions

View File

@@ -89,11 +89,11 @@ func ParseBasicAuth(auth string) (username, password string, ok bool) {
return
}
cs := string(c)
s := strings.IndexByte(cs, ':')
if s < 0 {
before, after, found := strings.Cut(cs, ":")
if !found {
return
}
return cs[:s], cs[s+1:], true
return before, after, true
}
func BasicAuth(username, passwd string) string {