From: Cosmos Nicolaou Date: Fri, 15 Feb 2013 04:35:08 +0000 (-0800) Subject: cmd/godoc: add support for doc.Package.Notes X-Git-Tag: go1.1rc2~1014 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c5b4292eb3dd41766a9ea0e89f630c5ec783bf42;p=gostls13.git cmd/godoc: add support for doc.Package.Notes Add support for displaying the notes of the form 'MARKER(userid): comment' now collected by the go/doc package. Any two or more uppercase letters are recognised as a marker. R=gri, rsc, bradfitz CC=golang-dev https://golang.org/cl/7334044 --- diff --git a/lib/godoc/package.html b/lib/godoc/package.html index e67cf93bed..cff91fa226 100644 --- a/lib/godoc/package.html +++ b/lib/godoc/package.html @@ -73,6 +73,11 @@ {{if .Bugs}}
Bugs
{{end}} + {{if .Notes}} + {{range $marker, $item := .Notes}} +
{{$marker}}
+ {{end}} + {{end}} @@ -168,6 +173,14 @@ {{comment_html .}} {{end}} {{end}} + {{with .Notes}} + {{range $marker, $content := .}} +

{{$marker}}

+ {{range .}} + {{comment_html .}} + {{end}} + {{end}} + {{end}} {{end}} {{with .PAst}} diff --git a/lib/godoc/package.txt b/lib/godoc/package.txt index 8b9ec456bf..12964b0010 100644 --- a/lib/godoc/package.txt +++ b/lib/godoc/package.txt @@ -61,7 +61,12 @@ TYPES BUGS {{range .}}{{comment_text . " " "\t"}} -{{end}}{{end}}{{end}}{{/* +{{end}}{{end}}{{with .Notes}} +{{range $marker, $content := .}} +{{$marker}} + +{{range $content}}{{comment_text . " " "\t"}} +{{end}}{{end}}{{end}}{{end}}{{/* ---------------------------------------