diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-15 10:23:08 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-15 10:23:08 +0800 |
commit | 3aae548374b0ca19b9e14c30a1ca6790251cc1db (patch) | |
tree | ef6b63bf7e8ed959a665213683d44e08287d30f5 /http_server.go | |
parent | {http_server,url}.go: Fix redirects (diff) | |
download | forge-3aae548374b0ca19b9e14c30a1ca6790251cc1db.tar.gz forge-3aae548374b0ca19b9e14c30a1ca6790251cc1db.tar.zst forge-3aae548374b0ca19b9e14c30a1ca6790251cc1db.zip |
*.go: Reformat
Diffstat (limited to 'http_server.go')
-rw-r--r-- | http_server.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/http_server.go b/http_server.go index e830fb1..ffbb711 100644 --- a/http_server.go +++ b/http_server.go @@ -122,9 +122,9 @@ func (router *http_router_t) ServeHTTP(w http.ResponseWriter, r *http.Request) { } // TODO: subgroups if non_empty_last_segments_len == separator_index+3 { - if redirect_with_slash(w, r) { - return - } + if redirect_with_slash(w, r) { + return + } handle_repo_index(w, r, params) return } @@ -135,7 +135,7 @@ func (router *http_router_t) ServeHTTP(w http.ResponseWriter, r *http.Request) { case "tree": params["rest"] = strings.Join(segments[separator_index+4:], "/") if len(segments) < separator_index+5 && redirect_with_slash(w, r) { - return + return } handle_repo_tree(w, r, params) case "raw": |