1
0
mirror of https://github.com/golang/go synced 2024-11-22 12:04:46 -07:00
go/lib/godoc/package.html
Robert Griesemer 53440da835 Factored out boilerplate from all html docs in doc directory:
- the first HTML comment in those files is extracted as page
  title when serving them
- lib/godoc.html is top-level template for all pages served
- experimented a bit with package documentation layout
  (feedback welcome)
- various related cleanups

TODO:
- The / page (doc/root.html) content repeats links that are
  in the navigation bar. It needs to be cleaned up.

R=rsc
DELTA=826  (86 added, 692 deleted, 48 changed)
OCL=35230
CL=35245
2009-10-01 14:08:00 -07:00

80 lines
1.8 KiB
HTML

<!--
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
{.section PDoc}
<!-- PackageName is printed as title by the top-level template -->
<p><code>import "{ImportPath|html}"</code></p>
{Doc|html-comment}
{.section Filenames}
<p>
<h4>Package files</h4>
<font size=-1>
{.repeated section @}
<a href="/{FilePath|html}/{@|html}">{@|html}</a>
{.end}
</font>
</p>
{.end}
{.section Consts}
<h2>Constants</h2>
{.repeated section @}
{Doc|html-comment}
<pre>{Decl|html}</pre>
{.end}
{.end}
{.section Vars}
<h2>Variables</h2>
{.repeated section @}
{Doc|html-comment}
<pre>{Decl|html}</pre>
{.end}
{.end}
{.section Funcs}
{.repeated section @}
<h2>func <a href="{Decl|link}">{Name|html}</a></h2>
<p><code>{Decl|html}</code></p>
{Doc|html-comment}
{.end}
{.end}
{.section Types}
{.repeated section @}
<h2>type <a href="{Decl|link}">{Type.Name|html}</a></h2>
{Doc|html-comment}
<p><pre>{Decl|html}</pre></p>
{.repeated section Consts}
{Doc|html-comment}
<pre>{Decl|html}</pre>
{.end}
{.repeated section Vars}
{Doc|html-comment}
<pre>{Decl|html}</pre>
{.end}
{.repeated section Factories}
<h3>func <a href="{Decl|link}">{Name|html}</a></h3>
<p><code>{Decl|html}</code></p>
{Doc|html-comment}
{.end}
{.repeated section Methods}
<h3>func ({Recv|html}) <a href="{Decl|link}">{Name|html}</a></h3>
<p><code>{Decl|html}</code></p>
{Doc|html-comment}
{.end}
{.end}
{.end}
{.section Bugs}
<h2>Bugs</h2>
{.repeated section @}
{@|html-comment}
{.end}
{.end}
{.end}
{.section Dirs}
<h2>Subdirectories</h2>
{.repeated section @}
<a href="{Name|html}">{Name|html}</a><br />
{.end}
{.end}