mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00: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:
parent
5fad05c818
commit
ef27ca3af5
@ -21,7 +21,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
blogRepo = "golang.org/x/blog"
|
blogRepo = "golang.org/x/blog"
|
||||||
blogURL = "http://blog.golang.org/"
|
blogURL = "https://blog.golang.org/"
|
||||||
blogPath = "/blog/"
|
blogPath = "/blog/"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -42,10 +42,11 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func blogInit(host string) {
|
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")
|
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 {
|
if pkg, err := build.Import(blogRepo, "", build.FindOnly); err == nil {
|
||||||
root = pkg.Dir
|
root = pkg.Dir
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user