]> Cypherpunks repositories - gostls13.git/commitdiff
godoc: add Examples link to top-level index
authorAndrew Gerrand <adg@golang.org>
Tue, 28 Feb 2012 05:05:12 +0000 (16:05 +1100)
committerAndrew Gerrand <adg@golang.org>
Tue, 28 Feb 2012 05:05:12 +0000 (16:05 +1100)
R=golang-dev
CC=golang-dev
https://golang.org/cl/5702043

lib/godoc/package.html

index cdebd4fc4a0169a2b3eb6459b88021115114bd7b..3e8af0fca0f96b63673836b43b601c83677baba8 100644 (file)
@@ -12,6 +12,9 @@
                        <dl>
                        <dd><a href="#overview">Overview</a></dd>
                        <dd><a href="#index">Index</a></dd>
+                       {{if $.Examples}}
+                               <dd><a href="#examples">Examples</a></dd>
+                       {{end}}
                        {{if $.Dirs}}
                                <dd><a href="#subdirectories">Subdirectories</a></dd>
                        {{end}}
@@ -54,7 +57,7 @@
                </dl>
 
                {{if $.Examples}}
-                       <h4>Examples</h4>
+                       <h4 id="examples">Examples</h4>
                        <dl>
                        {{range $.Examples}}
                        <dd><a class="exampleLink" href="#example_{{.Name}}">{{example_name .Name}}</a></dd>