From 049c0b4dcda3dfbd8e3d57169fe39aea3a634a42 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Mon, 30 Sep 2019 12:49:19 +0200 Subject: [PATCH] website: redirect unknown patsh to godoc With the renamed gioui.org module, any path could be a Gio package. Signed-off-by: Elias Naur --- website/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/website/main.go b/website/main.go index fbd4860c..84c0b885 100644 --- a/website/main.go +++ b/website/main.go @@ -69,9 +69,7 @@ func vanityHandler(w http.ResponseWriter, r *http.Request) { switch { case p == "/": 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: - http.NotFound(w, r) + http.Redirect(w, r, "https://godoc.org/gioui.org"+p, http.StatusFound) } }