1
0
mirror of https://github.com/golang/go synced 2024-11-26 03:47:57 -07:00

godoc: move example list into index section

Putting it before the Index (where it is now) is wrong:
we don't even know what's in the package yet.

Fixes #4484.

R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/6868071
This commit is contained in:
Russ Cox 2012-12-10 20:20:00 -05:00
parent 014137c839
commit dffdece819

View File

@ -17,10 +17,10 @@
</dl> </dl>
<dl> <dl>
<dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd> <dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd>
<dd><a href="#pkg-index" class="indexLink">Index</a></dd>
{{if $.Examples}} {{if $.Examples}}
<dd><a href="#pkg-examples" class="examplesLink">Examples</a></dd> <dd><a href="#pkg-examples" class="examplesLink">Examples</a></dd>
{{end}} {{end}}
<dd><a href="#pkg-index" class="indexLink">Index</a></dd>
{{if $.Dirs}} {{if $.Dirs}}
<dd><a href="#pkg-subdirectories">Subdirectories</a></dd> <dd><a href="#pkg-subdirectories">Subdirectories</a></dd>
{{end}} {{end}}
@ -38,22 +38,6 @@
</div> </div>
{{example_html "" $.Examples $.FSet}} {{example_html "" $.Examples $.FSet}}
{{if $.Examples}}
<div id="pkg-examples" class="toggleVisible">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Examples section">Examples ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Examples section">Examples ▾</h2>
<dl>
{{range $.Examples}}
<dd><a class="exampleLink" href="#example_{{.Name}}">{{example_name .Name}}</a></dd>
{{end}}
</dl>
</div>
</div>
{{end}}
<div id="pkg-index" class="toggleVisible"> <div id="pkg-index" class="toggleVisible">
<div class="collapsed"> <div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Index ▹</h2> <h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
@ -92,6 +76,17 @@
</dl> </dl>
</div><!-- #manual-nav --> </div><!-- #manual-nav -->
{{if $.Examples}}
<div id="pkg-examples">
<h4>Examples</h4>
<dl>
{{range $.Examples}}
<dd><a class="exampleLink" href="#example_{{.Name}}">{{example_name .Name}}</a></dd>
{{end}}
</dl>
</div>
{{end}}
{{with .Filenames}} {{with .Filenames}}
<h4>Package files</h4> <h4>Package files</h4>
<p> <p>