diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2025-10-07 08:56:12 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2025-10-07 08:56:12 -0700 |
| commit | 9809f203f12350e5bfe39ae9567c3024dc7e2a25 (patch) | |
| tree | 23c1627361ce000006f34d143ef0e387f39bb009 /roseh.moe.go | |
| parent | 2e6f0cfa92f523ca900084c75f398f98ba2e618d (diff) | |
| download | roseh.moe-9809f203f12350e5bfe39ae9567c3024dc7e2a25.tar.zst | |
Remove unnecessary package redirection
Diffstat (limited to 'roseh.moe.go')
| -rw-r--r-- | roseh.moe.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/roseh.moe.go b/roseh.moe.go index c1f9c99..6d519e9 100644 --- a/roseh.moe.go +++ b/roseh.moe.go @@ -458,22 +458,6 @@ func cmd(w http.ResponseWriter, r *http.Request) { } } -func pkg(w http.ResponseWriter, r *http.Request) { - var source string - switch r.PathValue("pkg") { - case "roseh.moe": - source = "git https://gitlab.com/rhogenson/roseh.moe.git" - default: - notFound(w, r) - return - } - if r.FormValue("go-get") == "1" { - fmt.Fprintf(w, `<meta name="go-import" content="roseh.moe/pkg/%s %s">`, r.PathValue("pkg"), source) - } else { - http.Redirect(w, r, "https://pkg.go.dev/roseh.moe/pkg/"+r.PathValue("pkg"), http.StatusFound) - } -} - func main() { flag.Parse() @@ -490,7 +474,6 @@ func main() { http.HandleFunc("GET /notepad", notepad) http.HandleFunc("POST /notepad", autosave) http.HandleFunc("GET /cmd/{cmd}", cmd) - http.HandleFunc("GET /pkg/{pkg}", pkg) http.HandleFunc("GET /static/", static) http.HandleFunc("GET /favicon.ico", favicon) http.HandleFunc("GET /{$}", index) |
