From ddc1de2fb25fda748d8d3a614b697e7f24c83eb7 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 6 Mar 2025 20:19:38 +0800 Subject: *: Reformat --- http_server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'http_server.go') 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 -- cgit v1.2.3