From 54a19febc0c7c49caa014254cabab571abad60ab Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 5 Apr 2025 19:45:17 +0800 Subject: misc: Move url.go into the misc package --- http_handle_repo_raw.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'http_handle_repo_raw.go') diff --git a/http_handle_repo_raw.go b/http_handle_repo_raw.go index ea2925c..3a4e152 100644 --- a/http_handle_repo_raw.go +++ b/http_handle_repo_raw.go @@ -10,6 +10,7 @@ import ( "strings" "go.lindenii.runxiyu.org/forge/git2c" + "go.lindenii.runxiyu.org/forge/misc" ) // httpHandleRepoRaw serves raw files, or directory listings that point to raw @@ -43,7 +44,7 @@ func httpHandleRepoRaw(writer http.ResponseWriter, request *http.Request, params params["readme"] = template.HTML("

README rendering here is WIP again

") // TODO renderTemplate(writer, "repo_raw_dir", params) case content != "": - if redirectNoDir(writer, request) { + if misc.RedirectNoDir(writer, request) { return } writer.Header().Set("Content-Type", "application/octet-stream") -- cgit v1.2.3