Skip to content

Commit d297d4d

Browse files
broadydmitshur
authored andcommitted
[release-branch.go1.11] cmd/godoc: add version info for golang.org
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 <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-on: https://go-review.googlesource.com/c/150683
1 parent 421e503 commit d297d4d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

cmd/godoc/appinit.go

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func main() {
8383
log.Fatal(err)
8484
}
8585
corpus.IndexDirectory = indexDirectoryDefault
86+
corpus.InitVersionInfo()
8687
go corpus.RunIndexer()
8788

8889
pres = godoc.NewPresentation(corpus)

cmd/godoc/regtest_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ func TestLiveServer(t *testing.T) {
4949
Path: "/pkg/os/",
5050
Substring: "func Open",
5151
},
52+
{
53+
Path: "/pkg/net/http/",
54+
Substring: `title="Added in Go 1.11"`,
55+
Message: "version information not present - failed InitVersionInfo?",
56+
},
5257
{
5358
Path: "/robots.txt",
5459
Substring: "Disallow: /search",

0 commit comments

Comments
 (0)