Skip to content

Commit

Permalink
[release-branch.go1.11] cmd/godoc: add version info for golang.org
Browse files Browse the repository at this point in the history
Adds version information for package docs for the production version of
godoc running on golang.org.

Updates golang/go#28893
Updates golang/go#5778

Change-Id: I8b56e8152b20b34104f274263a6c0b5a0180093b
Reviewed-on: https://go-review.googlesource.com/c/139557
Reviewed-by: Devon H. O'Dell <devon.odell@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/150683
  • Loading branch information
broady authored and dmitshur committed Nov 21, 2018
1 parent 421e503 commit d297d4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/godoc/appinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func main() {
log.Fatal(err)
}
corpus.IndexDirectory = indexDirectoryDefault
corpus.InitVersionInfo()
go corpus.RunIndexer()

pres = godoc.NewPresentation(corpus)
Expand Down
5 changes: 5 additions & 0 deletions cmd/godoc/regtest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ func TestLiveServer(t *testing.T) {
Path: "/pkg/os/",
Substring: "func Open",
},
{
Path: "/pkg/net/http/",
Substring: `title="Added in Go 1.11"`,
Message: "version information not present - failed InitVersionInfo?",
},
{
Path: "/robots.txt",
Substring: "Disallow: /search",
Expand Down

0 comments on commit d297d4d

Please sign in to comment.