aboutsummaryrefslogtreecommitdiff
path: root/git_hooks_handle_linux.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-30 17:56:44 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-30 17:56:44 +0800
commit9f01408ea7bb68684ec709fe1dabafd20254e055 (patch)
tree3ebc780eb406f9d41b853cfb751ad811706c22a4 /git_hooks_handle_linux.go
parentAdd basic tabs to repo index (diff)
downloadforge-9f01408ea7bb68684ec709fe1dabafd20254e055.tar.gz
forge-9f01408ea7bb68684ec709fe1dabafd20254e055.tar.zst
forge-9f01408ea7bb68684ec709fe1dabafd20254e055.zip
Avoid allocations by using unsafe strinng/bytes conversions
Diffstat (limited to '')
-rw-r--r--git_hooks_handle_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/git_hooks_handle_linux.go b/git_hooks_handle_linux.go
index 40ba1ac..36034f2 100644
--- a/git_hooks_handle_linux.go
+++ b/git_hooks_handle_linux.go
@@ -76,7 +76,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