diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-06 20:19:38 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-06 20:19:38 +0800 |
commit | ddc1de2fb25fda748d8d3a614b697e7f24c83eb7 (patch) | |
tree | fcba63ebed04caa7db504017cf82229df8e88b90 /http_server.go | |
parent | *: Bump go-git (diff) | |
download | forge-ddc1de2fb25fda748d8d3a614b697e7f24c83eb7.tar.gz forge-ddc1de2fb25fda748d8d3a614b697e7f24c83eb7.tar.zst forge-ddc1de2fb25fda748d8d3a614b697e7f24c83eb7.zip |
*: Reformat
Diffstat (limited to 'http_server.go')
-rw-r--r-- | http_server.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/http_server.go b/http_server.go index 7790d1f..199a3c5 100644 --- a/http_server.go +++ b/http_server.go @@ -100,7 +100,7 @@ func (router *http_router_t) ServeHTTP(w http.ResponseWriter, r *http.Request) { if separator_index > 0 { group_path = segments[:separator_index] } else { - group_path = segments[:len(segments) - 1] + group_path = segments[:len(segments)-1] } params["group_path"] = group_path @@ -160,7 +160,7 @@ func (router *http_router_t) ServeHTTP(w http.ResponseWriter, r *http.Request) { if non_empty_last_segments_len == separator_index+3 { if redirect_with_slash(w, r) { - return + return } handle_repo_index(w, r, params) return |