From dd95e2dbfad7f39060dc70f145d0e1478770e454 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 18 Feb 2025 10:23:44 +0800 Subject: *.go: Add some comments for docs --- git_hooks_handle.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'git_hooks_handle.go') diff --git a/git_hooks_handle.go b/git_hooks_handle.go index f8fb5bd..841c8d7 100644 --- a/git_hooks_handle.go +++ b/git_hooks_handle.go @@ -18,9 +18,13 @@ var ( err_get_ucred = errors.New("Failed getsockopt") ) +// hooks_handle_connection handles a connection from git_hooks_client via the +// unix socket. func hooks_handle_connection(conn net.Conn) { defer conn.Close() + // There aren't reasonable cases where someone would run this as + // another user. ucred, err := get_ucred(conn) if err != nil { conn.Write([]byte{1}) -- cgit v1.2.3