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#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>
This commit is contained in:
		
							parent
							
								
									3a5b620dc5
								
							
						
					
					
						commit
						f60d9635b1
					
				| 
						 | 
				
			
			@ -83,6 +83,7 @@ func main() {
 | 
			
		|||
		log.Fatal(err)
 | 
			
		||||
	}
 | 
			
		||||
	corpus.IndexDirectory = indexDirectoryDefault
 | 
			
		||||
	corpus.InitVersionInfo()
 | 
			
		||||
	go corpus.RunIndexer()
 | 
			
		||||
 | 
			
		||||
	pres = godoc.NewPresentation(corpus)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue