[release-branch.go1.11] cmd/godoc: redirect to https instead of http for blog.golang.org
And update some comments. Updates #21917 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> (cherry picked from commit ab3e662c42cc6b0e5d0a6b506b7da891b6d11959) Reviewed-on: https://go-review.googlesource.com/130635
This commit is contained in:
parent
a434f64ace
commit
c03d3e005f
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue