mirror of
https://github.com/golang/go
synced 2024-11-20 04:04:41 -07:00
055650daa4
To enable use -fulltext flag; e.g.: godoc -v -fulltext -http=:7777 Enabling the fulltext index will use significantly more memory as the text of all source code, the respective suffixarray, and the file set data structure is kept in memory. At the moment there is about 6Mb of source code (~1400 files) indexed under GOROOT. Source code + suffix array together consume 5*(size of source) or about 30Mb. The file set data structure consumes about 4b/src line. By default only up to 5000 results are shown for now. The presentation of the results needs tuning. In particular, if a string is found, clicking on the respective file does not highlight them, yet. At the moment, only Go source files are indexed. Eventually, the full text index should encompass other files as well. R=rsc, adg CC=golang-dev https://golang.org/cl/3182043
93 lines
2.4 KiB
HTML
93 lines
2.4 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 Accurate}
|
|
{.or}
|
|
<p>
|
|
<span class="alert" style="font-size:120%">Indexing in progress - result may be inaccurate</span>
|
|
</p>
|
|
{.end}
|
|
{.section Alt}
|
|
<p>
|
|
<span class="alert" style="font-size:120%">Did you mean: </span>
|
|
{.repeated section Alts}
|
|
<a href="search?q={@|html-esc}" style="font-size:120%">{@|html-esc}</a>
|
|
{.end}
|
|
</p>
|
|
{.end}
|
|
{.section Hit}
|
|
{.section Decls}
|
|
<h2 id="Global">Package-level declarations</h2>
|
|
{.repeated section @}
|
|
<h3 id="Global_{Pak.Path|url-pkg}">package <a href="/{Pak.Path|url-pkg}">{Pak.Name|html-esc}</a></h3>
|
|
{.repeated section Files}
|
|
{.repeated section Groups}
|
|
{.repeated section Infos}
|
|
<a href="/{File.Path|url-src}?h={Query|html-esc}#L{@|infoLine}">{File.Path|url-src}:{@|infoLine}</a>
|
|
<pre>{@|infoSnippet}</pre>
|
|
{.end}
|
|
{.end}
|
|
{.end}
|
|
{.end}
|
|
{.end}
|
|
{.section Others}
|
|
<h2 id="Local">Local declarations and uses</h2>
|
|
{.repeated section @}
|
|
<h3 id="Local_{Pak.Path|url-pkg}">package <a href="/{Pak.Path|url-pkg}">{Pak.Name|html-esc}</a></h3>
|
|
{.repeated section Files}
|
|
<a href="/{File.Path|url-src}?h={Query|html-esc}">{File.Path|url-src}</a>
|
|
<table class="layout">
|
|
{.repeated section Groups}
|
|
<tr>
|
|
<td width="25"></td>
|
|
<th align="left" valign="top">{Kind|infoKind}</th>
|
|
<td align="left" width="4"></td>
|
|
<td>
|
|
{.repeated section Infos}
|
|
<a href="/{File.Path|url-src}?h={Query|html-esc}#L{@|infoLine}">{@|infoLine}</a>
|
|
{.end}
|
|
</td>
|
|
</tr>
|
|
{.end}
|
|
</table>
|
|
{.end}
|
|
{.end}
|
|
{.end}
|
|
{.end}
|
|
{.section Illegal}
|
|
<p>
|
|
<span class="alert" style="font-size:120%">Illegal query syntax</span>
|
|
</p>
|
|
<p>
|
|
A legal query is a single identifier (such as <a href="search?q=ToLower">ToLower</a>)
|
|
or a qualified identifier (such as <a href="search?q=math.Sin">math.Sin</a>).
|
|
</p>
|
|
{.end}
|
|
{.section Textual}
|
|
<h2 id="Textual">Textual occurences</h2>
|
|
<table class="layout">
|
|
<tr>
|
|
<th align=left>File</th>
|
|
<th align=left>Occurences</th>
|
|
<th align=left>Lines</th>
|
|
</tr>
|
|
{.repeated section @}
|
|
<tr>
|
|
<td>
|
|
<a href="/{Filename|url-src}?h={Query|html-esc}">{Filename|url-src}</a>:
|
|
</td>
|
|
{Lines|linelist}
|
|
</tr>
|
|
{.end}
|
|
</table>
|
|
{.end}
|
|
{.section Complete}
|
|
{.or}
|
|
<p>
|
|
<span class="alert" style="font-size:120%">Incomplete list of results</span>
|
|
</p>
|
|
{.end}
|