From 9f01408ea7bb68684ec709fe1dabafd20254e055 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 30 Mar 2025 17:56:44 +0800 Subject: Avoid allocations by using unsafe strinng/bytes conversions --- git_hooks_handle_other.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git_hooks_handle_other.go') diff --git a/git_hooks_handle_other.go b/git_hooks_handle_other.go index d4ee43a..02236c7 100644 --- a/git_hooks_handle_other.go +++ b/git_hooks_handle_other.go @@ -54,7 +54,7 @@ func hooksHandler(conn net.Conn) { { var ok bool - packPass, ok = packPasses.Load(string(cookie)) + packPass, ok = packPasses.Load(bytesToString(cookie)) if !ok { if _, err = conn.Write([]byte{1}); err != nil { return -- cgit v1.2.3