From ad8705d9f66de7461d0035a9b184c5bc66c7ae64 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 8 Aug 2018 13:50:59 -0400 Subject: [PATCH] godoc/redirect: redirect design docs to Gerrit, not GitHub Gerrit's rendering is cleaner and Gerrit is the source of truth anyway. Fixes golang/go#26871. Change-Id: I0bf69d174662c7acc083b03b009bac92f781a17c Reviewed-on: https://go-review.googlesource.com/128596 Run-TryBot: Russ Cox Reviewed-by: Andrew Bonventre --- godoc/redirect/redirect.go | 6 +++--- godoc/redirect/redirect_test.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/godoc/redirect/redirect.go b/godoc/redirect/redirect.go index f86e0ada52..3bec53378e 100644 --- a/godoc/redirect/redirect.go +++ b/godoc/redirect/redirect.go @@ -99,7 +99,7 @@ var redirects = map[string]string{ "/issues": "https://github.com/golang/go/issues", "/issues/new": "https://github.com/golang/go/issues/new", "/play": "http://play.golang.org", - "/design": "https://github.com/golang/proposal/tree/master/design", + "/design": "https://go.googlesource.com/proposal/+/master/design", // In Go 1.2 the references page is part of /doc/. "/ref": "/doc/#references", @@ -115,7 +115,7 @@ var redirects = map[string]string{ "/tour": "http://tour.golang.org", "/wiki": "https://github.com/golang/go/wiki", - "/doc/articles/c_go_cgo.html": "/blog/c-go-cgo", + "/doc/articles/c_go_cgo.html": "/blog/c-go-cgo", "/doc/articles/concurrency_patterns.html": "/blog/go-concurrency-patterns-timing-out-and", "/doc/articles/defer_panic_recover.html": "/blog/defer-panic-and-recover", "/doc/articles/error_handling.html": "/blog/error-handling-and-go", @@ -245,6 +245,6 @@ func designHandler(w http.ResponseWriter, r *http.Request) { return } name := r.URL.Path[len(prefix):] - target := "https://github.com/golang/proposal/blob/master/design/" + name + ".md" + target := "https://go.googlesource.com/proposal/+/master/design/" + name + ".md" http.Redirect(w, r, target, http.StatusFound) } diff --git a/godoc/redirect/redirect_test.go b/godoc/redirect/redirect_test.go index cfc2f9790c..a242f4fa78 100644 --- a/godoc/redirect/redirect_test.go +++ b/godoc/redirect/redirect_test.go @@ -53,10 +53,10 @@ func TestRedirects(t *testing.T) { "/wiki/foo": {302, "https://github.com/golang/go/wiki/foo"}, "/wiki/foo/": {302, "https://github.com/golang/go/wiki/foo/"}, - "/design": {301, "https://github.com/golang/proposal/tree/master/design"}, + "/design": {301, "https://go.googlesource.com/proposal/+/master/design"}, "/design/": {302, "/design"}, - "/design/123-foo": {302, "https://github.com/golang/proposal/blob/master/design/123-foo.md"}, - "/design/text/123-foo": {302, "https://github.com/golang/proposal/blob/master/design/text/123-foo.md"}, + "/design/123-foo": {302, "https://go.googlesource.com/proposal/+/master/design/123-foo.md"}, + "/design/text/123-foo": {302, "https://go.googlesource.com/proposal/+/master/design/text/123-foo.md"}, "/cl/1": {302, "https://go-review.googlesource.com/1"}, "/cl/1/": {302, "https://go-review.googlesource.com/1"},