github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/lib/godoc/search.html (about) 1 <!-- 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. 5 --> 6 {{$query_url := urlquery .Query}} 7 {{with .Alert}} 8 <p> 9 <span class="alert" style="font-size:120%">{{html .}}</span> 10 </p> 11 {{end}} 12 {{with .Alt}} 13 <p> 14 <span class="alert" style="font-size:120%">Did you mean: </span> 15 {{range .Alts}} 16 <a href="search?q={{urlquery .}}" style="font-size:120%">{{html .}}</a> 17 {{end}} 18 </p> 19 {{end}} 20 {{with .Pak}} 21 <h2 id="Packages">Package {{html $.Query}}</h2> 22 <p> 23 <table class="layout"> 24 {{range .}} 25 {{$pkg_html := pkgLink .Pak.Path | html}} 26 <tr><td><a href="/{{$pkg_html}}">{{$pkg_html}}</a></td></tr> 27 {{end}} 28 </table> 29 </p> 30 {{end}} 31 {{with .Hit}} 32 {{with .Decls}} 33 <h2 id="Global">Package-level declarations</h2> 34 {{range .}} 35 {{$pkg_html := pkgLink .Pak.Path | html}} 36 <h3 id="Global_{{$pkg_html}}">package <a href="/{{$pkg_html}}">{{html .Pak.Name}}</a></h3> 37 {{range .Files}} 38 {{$src_html := srcLink .File.Path | html}} 39 {{range .Groups}} 40 {{range .}} 41 <a href="{{$src_html}}?h={{$query_url}}#L{{infoLine .}}">{{$src_html}}:{{infoLine .}}</a> 42 {{infoSnippet_html .}} 43 {{end}} 44 {{end}} 45 {{end}} 46 {{end}} 47 {{end}} 48 {{with .Others}} 49 <h2 id="Local">Local declarations and uses</h2> 50 {{range .}} 51 {{$pkg_html := pkgLink .Pak.Path | html}} 52 <h3 id="Local_{{$pkg_html}}">package <a href="/{{$pkg_html}}">{{html .Pak.Name}}</a></h3> 53 {{range .Files}} 54 {{$src_html := srcLink .File.Path | html}} 55 <a href="{{$src_html}}?h={{$query_url}}">{{$src_html}}</a> 56 <table class="layout"> 57 {{range .Groups}} 58 <tr> 59 <td width="25"></td> 60 <th align="left" valign="top">{{index . 0 | infoKind_html}}</th> 61 <td align="left" width="4"></td> 62 <td> 63 {{range .}} 64 <a href="{{$src_html}}?h={{$query_url}}#L{{infoLine .}}">{{infoLine .}}</a> 65 {{end}} 66 </td> 67 </tr> 68 {{end}} 69 </table> 70 {{end}} 71 {{end}} 72 {{end}} 73 {{end}} 74 {{with .Textual}} 75 {{if $.Complete}} 76 <h2 id="Textual">{{html $.Found}} textual occurrences</h2> 77 {{else}} 78 <h2 id="Textual">More than {{html $.Found}} textual occurrences</h2> 79 <p> 80 <span class="alert" style="font-size:120%">Not all files or lines containing "{{html $.Query}}" are shown.</span> 81 </p> 82 {{end}} 83 <p> 84 <table class="layout"> 85 {{range .}} 86 {{$src_html := srcLink .Filename | html}} 87 <tr> 88 <td align="left" valign="top"> 89 <a href="{{$src_html}}?h={{$query_url}}">{{$src_html}}</a>: 90 </td> 91 <td align="left" width="4"></td> 92 <th align="left" valign="top">{{len .Lines}}</th> 93 <td align="left" width="4"></td> 94 <td align="left"> 95 {{range .Lines}} 96 <a href="{{$src_html}}?h={{$query_url}}#L{{html .}}">{{html .}}</a> 97 {{end}} 98 {{if not $.Complete}} 99 ... 100 {{end}} 101 </td> 102 </tr> 103 {{end}} 104 {{if not $.Complete}} 105 <tr><td align="left">...</td></tr> 106 {{end}} 107 </table> 108 </p> 109 {{end}}