From c03d3e005f04636ee16d2881b7edca0f8813c718 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 21 Aug 2018 21:39:23 +0000 Subject: [PATCH] [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 TryBot-Result: Gobot Gobot Reviewed-by: Andrew Bonventre (cherry picked from commit ab3e662c42cc6b0e5d0a6b506b7da891b6d11959) Reviewed-on: https://go-review.googlesource.com/130635 --- cmd/godoc/blog.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/godoc/blog.go b/cmd/godoc/blog.go index e47b73eb..42abeb69 100644 --- a/cmd/godoc/blog.go +++ b/cmd/godoc/blog.go @@ -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 }