From b482a9bf0d292ec6542d2145a4408971e4c985f1 Mon Sep 17 00:00:00 2001 From: cui Date: Sat, 13 Sep 2025 13:57:18 +0800 Subject: [PATCH] refactor: to use strings.Lines --- auth/hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/hook.go b/auth/hook.go index 849a923d..3cb5b8b9 100644 --- a/auth/hook.go +++ b/auth/hook.go @@ -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