refactor: to use strings.Lines

pull/5430/head
cui 2025-09-13 13:57:18 +08:00 committed by GitHub
parent 36c6cc203e
commit b482a9bf0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ func (a *HookAuth) GetValues(s string) {
s = strings.ReplaceAll(s, "\r\n", "\n")
// iterate input lines
for _, val := range strings.Split(s, "\n") {
for val := range strings.Lines(s) {
v := strings.SplitN(val, "=", 2)
// skips non key and value format