address linter complaints
1 file changed, 5 insertions(+), 4 deletions(-)
changed files
M routes/handler.go → routes/handler.go
@@ -44,13 +44,14 @@ return } - if rest == "info/refs" && + switch { + case rest == "info/refs" && r.URL.RawQuery == "service=git-upload-pack" && - r.Method == "GET" { + r.Method == "GET": d.InfoRefs(w, r, params) - } else if rest == "git-upload-pack" && r.Method == "POST" { + case rest == "git-upload-pack" && r.Method == "POST": d.UploadPack(w, r, params) - } else if r.Method == "GET" { + case r.Method == "GET": if fixed, found := strings.CutSuffix(r.URL.Path, "/"); found { http.Redirect(w, r, fixed, http.StatusPermanentRedirect) } else {