aboutsummaryrefslogtreecommitdiff
path: root/http_handle_repo_raw.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-19 12:06:54 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-19 12:06:54 +0800
commit87b1ab519c77816d1c68a691e70137bd6f1c234b (patch)
treeca4b1a6f057138aed716caecce69571915da1b2c /http_handle_repo_raw.go
parentRemove old style guide (diff)
downloadforge-87b1ab519c77816d1c68a691e70137bd6f1c234b.tar.gz
forge-87b1ab519c77816d1c68a691e70137bd6f1c234b.tar.zst
forge-87b1ab519c77816d1c68a691e70137bd6f1c234b.zip
Remove underscores from Go code, pt 5
Diffstat (limited to '')
-rw-r--r--http_handle_repo_raw.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/http_handle_repo_raw.go b/http_handle_repo_raw.go
index a2e3536..e26f438 100644
--- a/http_handle_repo_raw.go
+++ b/http_handle_repo_raw.go
@@ -17,7 +17,7 @@ import (
func httpHandleRepoRaw(w http.ResponseWriter, r *http.Request, params map[string]any) {
var raw_path_spec, path_spec string
var repo *git.Repository
- var ref_hash plumbing.Hash
+ var refHash plumbing.Hash
var commit_object *object.Commit
var tree *object.Tree
var err error
@@ -26,12 +26,12 @@ func httpHandleRepoRaw(w http.ResponseWriter, r *http.Request, params map[string
repo, path_spec = params["repo"].(*git.Repository), strings.TrimSuffix(raw_path_spec, "/")
params["path_spec"] = path_spec
- if ref_hash, err = getRefHash(repo, params["ref_type"].(string), params["ref_name"].(string)); err != nil {
+ if refHash, err = getRefHash(repo, params["ref_type"].(string), params["ref_name"].(string)); err != nil {
http.Error(w, "Error getting ref hash: "+err.Error(), http.StatusInternalServerError)
return
}
- if commit_object, err = repo.CommitObject(ref_hash); err != nil {
+ if commit_object, err = repo.CommitObject(refHash); err != nil {
http.Error(w, "Error getting commit object: "+err.Error(), http.StatusInternalServerError)
return
}