mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
support for command documentation:
- made package tree handler generic so it can work on any fs tree - cleanups along the way R=rsc CC=r http://go/go-review/1017020
This commit is contained in:
parent
dc62c66c73
commit
4818d346b6
6 changed files with 114 additions and 53 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<table class="layout">
|
||||
<tr><td colspan="2"><a href="/pkg/{Path|html}">{Name|html}</a></td></tr>
|
||||
<tr><td colspan="2"><a href="{Path|path}">{Name|html}</a></td></tr>
|
||||
{.repeated section Dirs}
|
||||
<tr><td width="25em"></td><td>{@|dir}</td></tr>
|
||||
{.end}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
|
||||
<li class="blank"> </li>
|
||||
<li class="navhead">Programming</li>
|
||||
<li><a href="/cmd" class="noline">Command documentation</a></li>
|
||||
<li><a href="/pkg" class="noline">Package documentation</a></li>
|
||||
|
||||
<li class="blank"> </li>
|
||||
|
|
|
|||
|
|
@ -6,17 +6,21 @@
|
|||
|
||||
{.section PDoc}
|
||||
<!-- PackageName is printed as title by the top-level template -->
|
||||
<p><code>import "{ImportPath|html}"</code></p>
|
||||
{.section IsPkg}
|
||||
<p><code>import "{ImportPath|html}"</code></p>
|
||||
{.end}
|
||||
{Doc|html-comment}
|
||||
{.section Filenames}
|
||||
<p>
|
||||
<h4>Package files</h4>
|
||||
<span style="font-size:90%">
|
||||
{.repeated section @}
|
||||
<a href="/{FilePath|html}/{@|html}">{@|html}</a>
|
||||
{.section IsPkg}
|
||||
{.section Filenames}
|
||||
<p>
|
||||
<h4>Package files</h4>
|
||||
<span style="font-size:90%">
|
||||
{.repeated section @}
|
||||
<a href="/{FilePath|html}/{@|html}">{@|html}</a>
|
||||
{.end}
|
||||
</span>
|
||||
</p>
|
||||
{.end}
|
||||
</span>
|
||||
</p>
|
||||
{.end}
|
||||
{.section Consts}
|
||||
<h2>Constants</h2>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
{.section PDoc}
|
||||
{.section IsPkg}
|
||||
PACKAGE
|
||||
|
||||
package {PackageName}
|
||||
import "{ImportPath}"
|
||||
{.or}
|
||||
COMMAND DOCUMENTATION
|
||||
{.end}
|
||||
{.section Doc}
|
||||
|
||||
{@}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue