cmd/googlegolangorg: point to pkg.go.dev
Change the redirects to pkg.go.dev from godoc.org
Change-Id: Iecb1f6b16881bedaa47d65427b75b90baa2ae02a
Reviewed-on: https://go-review.googlesource.com/c/website/+/282292
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
diff --git a/cmd/googlegolangorg/main.go b/cmd/googlegolangorg/main.go
index 5b3be76..daf3966 100644
--- a/cmd/googlegolangorg/main.go
+++ b/cmd/googlegolangorg/main.go
@@ -22,7 +22,7 @@
},
"cloud": {
// This repo is now at "cloud.google.com/go", but still specifying the repo
- // here gives nicer errors in godoc.org and the go tool.
+ // here gives nicer errors in the go tool.
VCS: "git",
URL: "https://github.com/googleapis/google-cloud-go",
Src: github("googleapis/google-cloud-go"),
@@ -52,7 +52,7 @@
Src *src
}
-// src represents a godoc.org source redirect.
+// src represents a pkg.go.dev source redirect.
// https://github.com/golang/gddo/search?utf8=%E2%9C%93&q=sourceMeta
type src struct {
URL string
@@ -107,8 +107,8 @@
http.NotFound(w, r)
return
}
- godoc := "https://godoc.org/google.golang.org/" + head + tail
- // For users visting in a browser, redirect straight to godoc.org.
+ godoc := "https://pkg.go.dev/google.golang.org/" + head + tail
+ // For users visting in a browser, redirect straight to pkg.go.dev.
if isBrowser := r.FormValue("go-get") == ""; isBrowser {
http.Redirect(w, r, godoc, http.StatusFound)
return