1
0
mirror of https://github.com/golang/go synced 2024-10-03 22:21:22 -06:00
go/lib/godoc/search.html
Robert Griesemer d731dc8e72 Addressing issue brought up by dsymonds:
- When providing alternative spellings to a query, do not
  prefix it with a package qualifier as the suggestion may
  not have any results. Correctly filtering is quite a bit
  of work, and clicking the alternative spelling will always
  also show the qualified hits if they exist (but also others).
  Seems good enough for now.
- Give user feedback when the query syntax was wrong.
- Package names in search results are now links to the respective
  package documentation.
- Experimented with excluding main packages and test files
  from index with inconclusive results. Code is present and
  can be enabled by changing a flag in the source. This needs
  some more work.

R=rsc
CC=r, dsymonds
http://go/go-review/1026033
2009-11-08 23:34:08 -08:00

69 lines
1.9 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}" style="font-size:120%">{@|html}</a>
{.end}
</p>
{.end}
{.section Hit}
{.section Decls}
<h2>Package-level declarations</h2>
{.repeated section @}
<h3>package <a href="{Pak.Path|path}" class="noline">{Pak.Name|html}</a></h3>
{.repeated section Files}
{.repeated section Groups}
{.repeated section Infos}
<a href="{File.Path|html}?h={Query|html}#L{@|infoLine}" class="noline">{File.Path|html}:{@|infoLine}</a>
<pre>{@|infoSnippet}</pre>
{.end}
{.end}
{.end}
{.end}
{.end}
{.section Others}
<h2>Local declarations and uses</h2>
{.repeated section @}
<h3>package <a href="{Pak.Path|path}" class="noline">{Pak.Name|html}</a></h3>
{.repeated section Files}
<a href="{File.Path|html}?h={Query|html}" class="noline">{File.Path|html}</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|html}?h={Query|html}#L{@|infoLine}" class="info">{@|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}