1
0
mirror of https://github.com/golang/go synced 2024-11-18 09:04:49 -07:00

cmd/godoc: redirect to https instead of http for blog.golang.org

And update some comments.

Change-Id: I4e0b7062fa0d12982ad0f9ee150635cf11ed247c
Reviewed-on: https://go-review.googlesource.com/130555
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
This commit is contained in:
Brad Fitzpatrick 2018-08-21 21:39:23 +00:00
parent 5fad05c818
commit ef27ca3af5

View File

@ -21,7 +21,7 @@ import (
const (
blogRepo = "golang.org/x/blog"
blogURL = "http://blog.golang.org/"
blogURL = "https://blog.golang.org/"
blogPath = "/blog/"
)
@ -42,10 +42,11 @@ func init() {
}
func blogInit(host string) {
// Binary distributions will include the blog content in "/blog".
// Binary distributions included the blog content in "/blog".
// We stopped including this in Go 1.11.
root := filepath.Join(runtime.GOROOT(), "blog")
// Prefer content from go.blog repository if present.
// Prefer content from the golang.org/x/blog repository if present.
if pkg, err := build.Import(blogRepo, "", build.FindOnly); err == nil {
root = pkg.Dir
}