mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
website: add godoc.org redirects for the ui, cmd, apps modules
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+5
-2
@@ -35,9 +35,12 @@ func vanityHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
</head></html>`)
|
</head></html>`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
switch r.URL.Path {
|
p := r.URL.Path
|
||||||
case "/":
|
switch {
|
||||||
|
case p == "/":
|
||||||
http.Redirect(w, r, "https://git.sr.ht/~eliasnaur/gio", http.StatusFound)
|
http.Redirect(w, r, "https://git.sr.ht/~eliasnaur/gio", http.StatusFound)
|
||||||
|
case strings.HasPrefix(p, "/cmd"), strings.HasPrefix(p, "/ui"), strings.HasPrefix(p, "/apps"):
|
||||||
|
http.Redirect(w, r, "https://godoc.org/gioui.org"+p, http.StatusFound)
|
||||||
default:
|
default:
|
||||||
http.NotFound(w, r)
|
http.NotFound(w, r)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user