From 82960e6bc78445ac6e209dc9551528b649084b8e Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Tue, 26 Aug 2025 20:11:26 +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