mirror of
https://github.com/golang/go
synced 2024-11-05 14:56:10 -07:00
godoc: test fixes for recent cmdline changes.
Tests broken by: https://code.google.com/p/go/source/detail?r=1666da2583f4&repo=tools R=gri, adonovan CC=golang-codereviews https://golang.org/cl/58780043
This commit is contained in:
parent
9cd9226d63
commit
d682175c6e
@ -28,8 +28,8 @@ var godocTests = []struct {
|
||||
{
|
||||
[]string{"io", "WriteString"},
|
||||
[]string{
|
||||
`import "io"`,
|
||||
`func WriteString\(`,
|
||||
`WriteString writes the contents of the string s to w`,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -183,8 +183,8 @@ package main
|
||||
p.cmdHandler = handlerServer{p, c, "/cmd/", "/src/cmd"}
|
||||
p.pkgHandler = handlerServer{p, c, "/pkg/", "/src/pkg"}
|
||||
p.initFuncMap()
|
||||
p.PackageText = template.Must(template.New("PackageText").Funcs(p.FuncMap()).Parse(`{{with .PAst}}{{range $filename, $ast := .}}{{$filename}}:
|
||||
{{node $ $ast}}{{end}}{{end}}{{with .PDoc}}{{if $.IsMain}}COMMAND {{.Doc}}{{else}}PACKAGE {{.Doc}}{{end}}{{with .Funcs}}
|
||||
p.PackageText = template.Must(template.New("PackageText").Funcs(p.FuncMap()).Parse(`{{$info := .}}{{$filtered := .IsFiltered}}{{if $filtered}}{{range .PAst}}{{range .Decls}}{{node $info .}}{{end}}{{end}}{{else}}{{with .PAst}}{{range $filename, $ast := .}}{{$filename}}:
|
||||
{{node $ $ast}}{{end}}{{end}}{{end}}{{with .PDoc}}{{if $.IsMain}}COMMAND {{.Doc}}{{else}}PACKAGE {{.Doc}}{{end}}{{with .Funcs}}
|
||||
{{range .}}{{node $ .Decl}}
|
||||
{{comment_text .Doc " " "\t"}}{{end}}{{end}}{{end}}`))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user