]> Cypherpunks repositories - gostls13.git/commitdiff
godoc: Show type examples between variables and methods.
authorVolker Dobler <dr.volker.dobler@gmail.com>
Mon, 5 Dec 2011 23:52:43 +0000 (10:52 +1100)
committerAndrew Gerrand <adg@golang.org>
Mon, 5 Dec 2011 23:52:43 +0000 (10:52 +1100)
Fixes #2466.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5451094

lib/godoc/package.html

index 6c7be70588573ce90989cb4be9e6c11dade24413..1286f6eff41d22c2e5d4fab321125c25c69aba86 100644 (file)
@@ -89,7 +89,6 @@
                <h2 id="{{$tname_html}}">type <a href="/{{posLink_url .Decl $.FSet}}">{{$tname_html}}</a></h2>
                {{comment_html .Doc}}
                <p><pre>{{node_html .Decl $.FSet}}</pre></p>
-               {{example_html $tname $.Examples $.FSet}}
                {{range .Consts}}
                        {{comment_html .Doc}}
                        <pre>{{node_html .Decl $.FSet}}</pre>
@@ -98,6 +97,7 @@
                        {{comment_html .Doc}}
                        <pre>{{node_html .Decl $.FSet}}</pre>
                {{end}}
+               {{example_html $tname $.Examples $.FSet}}
                {{range .Factories}}
                        {{$name_html := html .Name}}
                        <h3 id="{{$name_html}}">func <a href="/{{posLink_url .Decl $.FSet}}">{{$name_html}}</a></h3>