2 Copyright 2009 The Go Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style
4 license that can be found in the LICENSE file.
7 Note: Static (i.e., not template-generated) href and id
8 attributes start with "pkg-" to make it impossible for
9 them to conflict with generated attributes (some of which
10 correspond to Go identifiers).
14 document.ANALYSIS_DATA = {{$.AnalysisData}};
15 document.CALLGRAPH = {{$.CallGraph}};
19 {{/* command documentation */}}
22 {{/* package documentation */}}
25 <dd><code>import "{{html .ImportPath}}"</code></dd>
28 <dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd>
29 <dd><a href="#pkg-index" class="indexLink">Index</a></dd>
31 <dd><a href="#pkg-examples" class="examplesLink">Examples</a></dd>
34 <dd><a href="#pkg-subdirectories">Subdirectories</a></dd>
38 <!-- The package's Name is printed as title by the top-level template -->
39 <div id="pkg-overview" class="toggleVisible">
40 <div class="collapsed">
41 <h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
43 <div class="expanded">
44 <h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
50 <div id="pkg-index" class="toggleVisible">
51 <div class="collapsed">
52 <h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
54 <div class="expanded">
55 <h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
57 <!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
61 <dd><a href="#pkg-constants">Constants</a></dd>
64 <dd><a href="#pkg-variables">Variables</a></dd>
67 {{$name_html := html .Name}}
68 <dd><a href="#{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
71 {{$tname_html := html .Name}}
72 <dd><a href="#{{$tname_html}}">type {{$tname_html}}</a></dd>
74 {{$name_html := html .Name}}
75 <dd> <a href="#{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
78 {{$name_html := html .Name}}
79 <dd> <a href="#{{$tname_html}}.{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
83 {{range $marker, $item := $.Notes}}
84 <dd><a href="#pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</a></dd>
88 </div><!-- #manual-nav -->
91 <div id="pkg-examples">
93 <div class="js-expandAll expandAll collapsed">(Expand All)</div>
96 <dd><a class="exampleLink" href="#example_{{.Name}}">{{example_name .Name}}</a></dd>
103 <h3>Package files</h3>
105 <span style="font-size:90%">
107 <a href="{{.|srcLink|html}}">{{.|filename|html}}</a>
112 </div><!-- .expanded -->
113 </div><!-- #pkg-index -->
115 {{if ne $.CallGraph "null"}}
116 <div id="pkg-callgraph" class="toggle" style="display: none">
117 <div class="collapsed">
118 <h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
119 </div> <!-- .expanded -->
120 <div class="expanded">
121 <h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
123 In the call graph viewer below, each node
124 is a function belonging to this package
125 and its children are the functions it
126 calls—perhaps dynamically.
129 The root nodes are the entry points of the
130 package: functions that may be called from
132 There may be non-exported or anonymous
133 functions among them if they are called
134 dynamically from another package.
137 Click a node to visit that function's source code.
138 From there you can visit its callers by
139 clicking its declaring <code>func</code>
143 Functions may be omitted if they were
144 determined to be unreachable in the
145 particular programs or tests that were
148 <!-- Zero means show all package entry points. -->
149 <ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
151 </div> <!-- #pkg-callgraph -->
155 <h2 id="pkg-constants">Constants</h2>
157 {{comment_html .Doc}}
158 <pre>{{node_html $ .Decl true}}</pre>
162 <h2 id="pkg-variables">Variables</h2>
164 {{comment_html .Doc}}
165 <pre>{{node_html $ .Decl true}}</pre>
169 {{/* Name is a string - no need for FSet */}}
170 {{$name_html := html .Name}}
171 <h2 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a>
172 <a class="permalink" href="#{{$name_html}}">¶</a>
173 {{$since := since "func" "" .Name $.PDoc.ImportPath}}
174 {{if $since}}<span title="Added in Go {{$since}}">{{$since}}</span>{{end}}
176 <pre>{{node_html $ .Decl true}}</pre>
177 {{comment_html .Doc}}
178 {{example_html $ .Name}}
179 {{callgraph_html $ "" .Name}}
184 {{$tname_html := html .Name}}
185 <h2 id="{{$tname_html}}">type <a href="{{posLink_url $ .Decl}}">{{$tname_html}}</a>
186 <a class="permalink" href="#{{$tname_html}}">¶</a>
187 {{$since := since "type" "" .Name $.PDoc.ImportPath}}
188 {{if $since}}<span title="Added in Go {{$since}}">{{$since}}</span>{{end}}
190 {{comment_html .Doc}}
191 <pre>{{node_html $ .Decl true}}</pre>
194 {{comment_html .Doc}}
195 <pre>{{node_html $ .Decl true}}</pre>
199 {{comment_html .Doc}}
200 <pre>{{node_html $ .Decl true}}</pre>
203 {{example_html $ $tname}}
204 {{implements_html $ $tname}}
205 {{methodset_html $ $tname}}
208 {{$name_html := html .Name}}
209 <h3 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a>
210 <a class="permalink" href="#{{$name_html}}">¶</a>
211 {{$since := since "func" "" .Name $.PDoc.ImportPath}}
212 {{if $since}}<span title="Added in Go {{$since}}">{{$since}}</span>{{end}}
214 <pre>{{node_html $ .Decl true}}</pre>
215 {{comment_html .Doc}}
216 {{example_html $ .Name}}
217 {{callgraph_html $ "" .Name}}
221 {{$name_html := html .Name}}
222 <h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a>
223 <a class="permalink" href="#{{$tname_html}}.{{$name_html}}">¶</a>
224 {{$since := since "method" .Recv .Name $.PDoc.ImportPath}}
225 {{if $since}}<span title="Added in Go {{$since}}">{{$since}}</span>{{end}}
227 <pre>{{node_html $ .Decl true}}</pre>
228 {{comment_html .Doc}}
229 {{$name := printf "%s_%s" $tname .Name}}
230 {{example_html $ $name}}
231 {{callgraph_html $ .Recv .Name}}
237 {{range $marker, $content := .}}
238 <h2 id="pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</h2>
239 <ul style="list-style: none; padding: 0;">
241 <li><a href="{{posLink_url $ .}}" style="float: left;">☞</a> {{comment_html .Body}}</li>
249 {{range $filename, $ast := .}}
250 <a href="{{$filename|srcLink|html}}">{{$filename|filename|html}}</a>:<pre>{{node_html $ $ast false}}</pre>
255 {{/* DirList entries are numbers and strings - no need for FSet */}}
257 <h2 id="pkg-subdirectories">Subdirectories</h2>
259 <div class="pkg-dir">
262 <th class="pkg-name">Name</th>
263 <th class="pkg-synopsis">Synopsis</th>
266 {{if not (or (eq $.Dirname "/src/cmd") $.DirFlat)}}
268 <td colspan="2"><a href="..">..</a></td>
276 <td class="pkg-name">
277 <a href="{{html .Path}}/{{modeQueryString $.Mode | html}}">{{html .Path}}</a>
281 <td class="pkg-name" style="padding-left: {{multiply .Depth 20}}px;">
282 <a href="{{html .Path}}/{{modeQueryString $.Mode | html}}">{{html .Name}}</a>
285 <td class="pkg-synopsis">