diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-19 11:20:24 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-19 11:20:24 +0800 |
commit | 54926a719de46b3c359f2f7ce3c29ff4fe55397b (patch) | |
tree | b81028ae83c949807313a54296bf6d0b59bea8a0 /ssh_handle_receive_pack.go | |
parent | Remove underscores from Go code, pt 2 (diff) | |
download | forge-54926a719de46b3c359f2f7ce3c29ff4fe55397b.tar.gz forge-54926a719de46b3c359f2f7ce3c29ff4fe55397b.tar.zst forge-54926a719de46b3c359f2f7ce3c29ff4fe55397b.zip |
Remove underscores from Go code, pt 3
Diffstat (limited to 'ssh_handle_receive_pack.go')
-rw-r--r-- | ssh_handle_receive_pack.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ssh_handle_receive_pack.go b/ssh_handle_receive_pack.go index 3f7c1f1..b930784 100644 --- a/ssh_handle_receive_pack.go +++ b/ssh_handle_receive_pack.go @@ -14,21 +14,21 @@ import ( "go.lindenii.runxiyu.org/lindenii-common/cmap" ) -type pack_to_hook_t struct { +type packPass struct { session glider_ssh.Session repo *git.Repository pubkey string - direct_access bool + directAccess bool repo_path string - user_id int - user_type string - repo_id int + userID int + userType string + repoID int group_path []string repo_name string - contrib_requirements string + contribReq string } -var pack_to_hook_by_cookie = cmap.Map[string, pack_to_hook_t]{} +var packPasses = cmap.Map[string, packPass]{} // ssh_handle_receive_pack handles attempts to push to repos. func ssh_handle_receive_pack(session glider_ssh.Session, pubkey, repo_identifier string) (err error) { @@ -92,20 +92,20 @@ func ssh_handle_receive_pack(session glider_ssh.Session, pubkey, repo_identifier fmt.Fprintln(session.Stderr(), "Error while generating cookie:", err) } - pack_to_hook_by_cookie.Store(cookie, pack_to_hook_t{ + packPasses.Store(cookie, packPass{ session: session, pubkey: pubkey, - direct_access: direct_access, + directAccess: direct_access, repo_path: repo_path, - user_id: user_id, - repo_id: repo_id, + userID: user_id, + repoID: repo_id, group_path: group_path, repo_name: repo_name, repo: repo, - contrib_requirements: contrib_requirements, - user_type: user_type, + contribReq: contrib_requirements, + userType: user_type, }) - defer pack_to_hook_by_cookie.Delete(cookie) + defer packPasses.Delete(cookie) // The Delete won't execute until proc.Wait returns unless something // horribly wrong such as a panic occurs. |