From: Robert Griesemer Date: Thu, 23 Feb 2012 20:44:11 +0000 (-0800) Subject: godoc: consistent placement of documentation sections X-Git-Tag: weekly.2012-03-04~186 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c1139549bc51ebb429f5322699c267f440b3f82b;p=gostls13.git godoc: consistent placement of documentation sections Fixes #1226. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5694052 --- diff --git a/lib/godoc/package.html b/lib/godoc/package.html index 01043b05f2..2e1be5104a 100644 --- a/lib/godoc/package.html +++ b/lib/godoc/package.html @@ -76,22 +76,22 @@ {{with .Consts}}

Constants

{{range .}} - {{comment_html .Doc}}
{{node_html .Decl $.FSet}}
+ {{comment_html .Doc}} {{end}} {{end}} {{with .Vars}}

Variables

{{range .}} - {{comment_html .Doc}}
{{node_html .Decl $.FSet}}
+ {{comment_html .Doc}} {{end}} {{end}} {{range .Funcs}} {{/* Name is a string - no need for FSet */}} {{$name_html := html .Name}}

func {{$name_html}}

-

{{node_html .Decl $.FSet}}

+
{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{example_html .Name $.Examples $.FSet}} {{end}} @@ -99,28 +99,33 @@ {{$tname := .Name}} {{$tname_html := html .Name}}

type {{$tname_html}}

- {{comment_html .Doc}}
{{node_html .Decl $.FSet}}
+ {{comment_html .Doc}} + {{range .Consts}} - {{comment_html .Doc}}
{{node_html .Decl $.FSet}}
+ {{comment_html .Doc}} {{end}} + {{range .Vars}} - {{comment_html .Doc}}
{{node_html .Decl $.FSet}}
+ {{comment_html .Doc}} {{end}} + {{example_html $tname $.Examples $.FSet}} + {{range .Funcs}} {{$name_html := html .Name}}

func {{$name_html}}

-

{{node_html .Decl $.FSet}}

+
{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{example_html .Name $.Examples $.FSet}} {{end}} + {{range .Methods}} {{$name_html := html .Name}}

func ({{html .Recv}}) {{$name_html}}

-

{{node_html .Decl $.FSet}}

+
{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{$name := printf "%s_%s" $tname .Name}} {{example_html $name $.Examples $.FSet}}