diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-05 09:57:55 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-05 09:58:06 +0800 |
commit | 64f79d9f0f6b7a0cfdad797203d71ad055837210 (patch) | |
tree | 1a17742dd80daf7906c71081782b7a1242d9e400 /ssh_handle_upload_pack.go | |
parent | repo/*: Use var instead of := (diff) | |
download | forge-64f79d9f0f6b7a0cfdad797203d71ad055837210.tar.gz forge-64f79d9f0f6b7a0cfdad797203d71ad055837210.tar.zst forge-64f79d9f0f6b7a0cfdad797203d71ad055837210.zip |
*: Replacing more := with var
Diffstat (limited to 'ssh_handle_upload_pack.go')
-rw-r--r-- | ssh_handle_upload_pack.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ssh_handle_upload_pack.go b/ssh_handle_upload_pack.go index 3332631..fbbdfda 100644 --- a/ssh_handle_upload_pack.go +++ b/ssh_handle_upload_pack.go @@ -14,8 +14,8 @@ import ( // ssh_handle_upload_pack handles clones/fetches. It just uses git-upload-pack // and has no ACL checks. func ssh_handle_upload_pack(session glider_ssh.Session, pubkey string, repo_identifier string) (err error) { - _, _, _, repo_path, _, _, _, _, err := get_repo_path_perms_from_ssh_path_pubkey(session.Context(), repo_identifier, pubkey) - if err != nil { + var repo_path string + if _, _, _, repo_path, _, _, _, _, err = get_repo_path_perms_from_ssh_path_pubkey(session.Context(), repo_identifier, pubkey); err != nil { return err } @@ -25,8 +25,7 @@ func ssh_handle_upload_pack(session glider_ssh.Session, pubkey string, repo_iden proc.Stdout = session proc.Stderr = session.Stderr() - err = proc.Start() - if err != nil { + if err = proc.Start(); err != nil { fmt.Fprintln(session.Stderr(), "Error while starting process:", err) return err } |