aboutsummaryrefslogtreecommitdiff
path: root/http_handle_repo_info.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-13 01:28:35 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-13 01:28:35 +0800
commit14326ba9be276d2649b4681d3ebed1c32f65013f (patch)
tree9bd8717b6968b5a977d925d193042a92bc68f311 /http_handle_repo_info.go
parentssh_{server,utils}: Swap filenames (diff)
downloadforge-14326ba9be276d2649b4681d3ebed1c32f65013f.tar.gz
forge-14326ba9be276d2649b4681d3ebed1c32f65013f.tar.zst
forge-14326ba9be276d2649b4681d3ebed1c32f65013f.zip
_header.html: Add header
Diffstat (limited to 'http_handle_repo_info.go')
-rw-r--r--http_handle_repo_info.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/http_handle_repo_info.go b/http_handle_repo_info.go
index 5dd92e9..e220f18 100644
--- a/http_handle_repo_info.go
+++ b/http_handle_repo_info.go
@@ -5,6 +5,6 @@ import (
"net/url"
)
-func handle_repo_info(w http.ResponseWriter, r *http.Request, params map[string]string) {
- http.Error(w, "\x1b[1;93mHi! We do not support Git operations over HTTP yet.\x1b[0m\n\x1b[1;93mMeanwhile, please use ssh by simply replacing the scheme with \"ssh://\":\x1b[0m\n\x1b[1;93mssh://"+r.Host+"/"+url.PathEscape(params["group_name"])+"/:/repos/"+url.PathEscape(params["repo_name"])+"\x1b[0m", http.StatusNotImplemented)
+func handle_repo_info(w http.ResponseWriter, r *http.Request, params map[string]any) {
+ http.Error(w, "\x1b[1;93mHi! We do not support Git operations over HTTP yet.\x1b[0m\n\x1b[1;93mMeanwhile, please use ssh by simply replacing the scheme with \"ssh://\":\x1b[0m\n\x1b[1;93mssh://"+r.Host+"/"+url.PathEscape(params["group_name"].(string))+"/:/repos/"+url.PathEscape(params["repo_name"].(string))+"\x1b[0m", http.StatusNotImplemented)
}