From 18706a6e8377d0e0061b3d29562287d718b70f36 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 18 Mar 2025 20:45:22 +0800 Subject: Remove underscores from Go code, pt 2 --- acl.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'acl.go') diff --git a/acl.go b/acl.go index d2e8190..8d23dc3 100644 --- a/acl.go +++ b/acl.go @@ -9,9 +9,9 @@ import ( "github.com/jackc/pgx/v5/pgtype" ) -// get_path_perm_by_group_repo_key returns the filesystem path and direct +// getRepoInfo returns the filesystem path and direct // access permission for a given repo and a provided ssh public key. -func get_path_perm_by_group_repo_key(ctx context.Context, group_path []string, repo_name, ssh_pubkey string) (repo_id int, filesystem_path string, access bool, contrib_requirements, user_type string, user_id int, err error) { +func getRepoInfo(ctx context.Context, group_path []string, repoName, sshPubkey string) (repoID int, fsPath string, access bool, contribReq, userType string, userID int, err error) { err = database.QueryRow(ctx, ` WITH RECURSIVE group_path_cte AS ( -- Start: match the first name in the path where parent_group IS NULL @@ -51,7 +51,7 @@ LEFT JOIN users u ON u.id = s.user_id LEFT JOIN user_group_roles ugr ON ugr.group_id = g.id AND ugr.user_id = u.id WHERE g.depth = cardinality($1::text[]) AND r.name = $2 -`, pgtype.FlatArray[string](group_path), repo_name, ssh_pubkey, - ).Scan(&repo_id, &filesystem_path, &access, &contrib_requirements, &user_type, &user_id) +`, pgtype.FlatArray[string](group_path), repoName, sshPubkey, + ).Scan(&repoID, &fsPath, &access, &contribReq, &userType, &userID) return } -- cgit v1.2.3