summaryrefslogtreecommitdiff
path: root/lib/godoc
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-01-17 12:40:45 +0100
committerOndřej Surý <ondrej@sury.org>2011-01-17 12:40:45 +0100
commit3e45412327a2654a77944249962b3652e6142299 (patch)
treebc3bf69452afa055423cbe0c5cfa8ca357df6ccf /lib/godoc
parentc533680039762cacbc37db8dc7eed074c3e497be (diff)
downloadgolang-3e45412327a2654a77944249962b3652e6142299.tar.gz
Imported Upstream version 2011.01.12upstream/2011.01.12
Diffstat (limited to 'lib/godoc')
-rw-r--r--lib/godoc/godoc.html178
-rw-r--r--lib/godoc/package.html38
-rw-r--r--lib/godoc/package.txt20
-rw-r--r--lib/godoc/search.html49
-rw-r--r--lib/godoc/search.txt24
-rw-r--r--lib/godoc/source.html23
6 files changed, 126 insertions, 206 deletions
diff --git a/lib/godoc/godoc.html b/lib/godoc/godoc.html
index aef7f4dc4..f1d9c2ad9 100644
--- a/lib/godoc/godoc.html
+++ b/lib/godoc/godoc.html
@@ -1,136 +1,45 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/transitional.dtd">
+<!DOCTYPE html>
<html>
<head>
-
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <title>{Title|html-esc}</title>
-
- <link rel="stylesheet" type="text/css" href="/doc/style.css">
- <script type="text/javascript" src="/doc/godocs.js"></script>
-
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+{.section Title}
+ <title>{@|html-esc} - The Go Programming Language</title>
+{.or}
+ <title>The Go Programming Language</title>
+{.end}
+<link rel="stylesheet" href="/doc/all.css" type="text/css" media="all" charset="utf-8">
+<!--[if lt IE 8]>
+<link rel="stylesheet" href="/doc/ie.css" type="text/css">
+<![endif]-->
+<script type="text/javascript" src="/doc/godocs.js"></script>
</head>
-
<body>
-
- <script>
- // Catch 'enter' key down events and trigger the search form submission.
- function codesearchKeyDown(event) {.meta-left}
- if (event.which == 13) {.meta-left}
- var form = document.getElementById('codesearch');
- var query = document.getElementById('codesearchQuery');
- form.q.value = "lang:go package:go.googlecode.com " + query.value;
- document.getElementById('codesearch').submit();
- {.meta-right}
- return true;
- {.meta-right}
-
- // Capture the submission event and construct the query parameter.
- function codeSearchSubmit() {.meta-left}
- var query = document.getElementById('codesearchQuery');
- var form = document.getElementById('codesearch');
- form.q.value = "lang:go package:go.googlecode.com " + query.value;
- return true;
- {.meta-right}
- </script>
-
-<div id="topnav">
- <table summary="">
- <tr>
- <td id="headerImage">
- <a href="/"><img src="/doc/logo-153x55.png" height="55" width="153" alt="Go Home Page" style="border:0" /></a>
- </td>
- <td>
- <div id="headerDocSetTitle">The Go Programming Language</div>
- </td>
- <td>
- <!-- <table>
- <tr>
- <td>
- <! The input box is outside of the form because we want to add
- a couple of restricts to the query before submitting. If we just
- add the restricts to the text box before submitting, then they
- appear in the box when the user presses 'back'. Thus we use a
- hidden field in the form. However, there's no way to stop the
- non-hidden text box from also submitting a value unless we move
- it outside of the form
- <input type="search" id="codesearchQuery" value="" size="30" onkeydown="return codesearchKeyDown(event);"/>
- <form method="GET" action="http://www.google.com/codesearch" id="codesearch" class="search" onsubmit="return codeSearchSubmit();" style="display:inline;">
- <input type="hidden" name="q" value=""/>
- <input type="submit" value="Code search" />
- <span style="color: red">(TODO: remove for now?)</span>
- </form>
- </td>
- </tr>
- <tr>
- <td>
- <span style="color: gray;">(e.g. &ldquo;pem&rdquo; or &ldquo;xml&rdquo;)</span>
- </td>
- </tr>
- </table> -->
- </td>
- </tr>
- </table>
-</div>
-
-<div id="linkList">
- <ul>
- <li class="navhead"><a href="/">Home</a></li>
- <li class="blank">&nbsp;</li>
-
- <li class="navhead"><a href="/doc/go_learning.html">Go Resources</a></li>
- <li class="navhead"><a href="/doc/install.html">Installing Go</a></li>
- <li class="blank">&nbsp;</li>
-
- <li class="navhead">Selected Documents</li>
- <li><a href="/doc/go_tutorial.html">Tutorial</a></li>
- <li><a href="/doc/effective_go.html">Effective Go</a></li>
- <li><a href="/doc/go_faq.html">FAQ</a></li>
- <li><a href="/doc/go_lang_faq.html">Language Design FAQ</a></li>
- <li><a href="/doc/go_programming_faq.html">Programming FAQ</a></li>
-
- <li class="blank">&nbsp;</li>
- <li class="navhead">References</li>
- <li><a href="/doc/go_spec.html">Language Specification</a></li>
- <li><a href="/pkg">Package documentation</a></li>
- {.repeated section PkgRoots}
- <li><a href="/pkg/{@|html-esc}">Package documentation for {@|html-esc}</a></li>
- {.end}
- <li><a href="/cmd">Command documentation</a></li>
- <li><a href="/src">Source files</a></li>
-
- <li class="blank">&nbsp;</li>
- <li class="navhead">Help &amp; Community</li>
- <li><a href="http://blog.golang.org/">Go Blog</a></li>
- <li><a href="http://groups.google.com/group/golang-nuts">Go Nuts mailing list</a></li>
- <li>#go-nuts on irc.freenode.net</li>
- <li><a href="http://twitter.com/go_nuts">@go_nuts on Twitter</a></li>
- <li><a href="http://youtube.com/user/gocoding">gocoding YouTube Channel</a></li>
- <li><a href="http://code.google.com/p/go/issues/list">Issue tracker</a></li>
- <li><a href="http://code.google.com/p/go/wiki/WikiIndex">Go Wiki</a></li>
-
- <li class="blank">&nbsp;</li>
- <li class="navhead">Go Dashboard</li>
- <li><a href="http://godashboard.appspot.com/">Build Status</a></li>
- <li><a href="http://godashboard.appspot.com/package">External Packages</a></li>
- <li><a href="http://godashboard.appspot.com/benchmarks">Benchmarks</a></li>
-
- <li class="blank">&nbsp;</li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Go code search</li>
- <form method="GET" action="/search" class="search">
- <input type="search" name="q" value="{Query|html-esc}" size="25" style="width:80%; max-width:200px" />
- <input type="submit" value="Go" />
- </form>
-
- <li class="blank">&nbsp;</li>
- <li class="navhead">Last update</li>
- <li>{Timestamp|time}</li>
- <li>Build version {Version|html-esc}</li>
- </ul>
-</div>
-
-<div id="content">
+<div id="container">
+ <div id="topnav">
+ <h1 id="title">The Go Programming Language</h1>
+ <div id="nav-main">
+ <ul>
+ <li><a href="/">Home</a></li><li><a href="/doc/install.html">Getting Started</a></li><li><a href="/doc/docs.html">Documentation</a></li><li><a href="/doc/contrib.html">Contributing</a></li><li><a href="/doc/community.html">Community</a></li>
+ </ul>
+ <div class="quickref">
+ <form method="GET" action="/search">
+ {.section PkgRoots}
+ {.repeated section PkgRoots}
+ <a href="/pkg/{@|html-esc}">{@|html-esc}</a> <span class="sep">|</span>
+ {.end}
+ {.or}
+ References:
+ {.end}
+ <a href="/pkg/">Packages</a> <span class="sep">|</span>
+ <a href="/cmd/">Commands</a> <span class="sep">|</span>
+ <a href="/doc/go_spec.html">Specification</a>
+ <input id="search" type="text" name="q" value="{.section Query}{Query|html-esc}{.or}code search{.end}" class="{.section Query}{.or}inactive{.end}" />
+ </form>
+ </div>
+ </div>
+ <a id="logo-box" href="/"></a>
+ </div>
+ <div id="content">
<!-- Menu is HTML-escaped elsewhere -->
{.section Menu}
<div id="menu">
@@ -153,13 +62,10 @@
<!-- Content is HTML-escaped elsewhere -->
{Content}
+ </div>
+ <div id="site-info">
+ <p>Build version {Version|html-esc}. Except as noted, this content is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 License</a>.</p>
+ </div>
</div>
-
-<div id="footer">
-<p>Except as noted, this content is
- licensed under <a href="http://creativecommons.org/licenses/by/3.0/">
- Creative Commons Attribution 3.0</a>.
-</div>
-
</body>
</html>
diff --git a/lib/godoc/package.html b/lib/godoc/package.html
index 0eff78e45..5dc61b7cd 100644
--- a/lib/godoc/package.html
+++ b/lib/godoc/package.html
@@ -6,17 +6,19 @@
{.section PAst}
<pre>
- {@|html}
+ {@ FSet|html}
</pre>
{.end}
{.section PDoc}
<!-- PackageName is printed as title by the top-level template -->
{.section IsPkg}
+ {# ImportPath is a string - no need for FSet}
<p><code>import "{ImportPath|html-esc}"</code></p>
{.end}
{Doc|html-comment}
{.section IsPkg}
{.section Filenames}
+ {# Filenames are strings - no need for FSet}
<p>
<h4>Package files</h4>
<span style="font-size:90%">
@@ -31,44 +33,46 @@
<h2 id="Constants">Constants</h2>
{.repeated section @}
{Doc|html-comment}
- <pre>{Decl|html}</pre>
+ <pre>{Decl FSet|html}</pre>
{.end}
{.end}
{.section Vars}
<h2 id="Variables">Variables</h2>
{.repeated section @}
{Doc|html-comment}
- <pre>{Decl|html}</pre>
+ <pre>{Decl FSet|html}</pre>
{.end}
{.end}
{.section Funcs}
{.repeated section @}
- <h2 id="{Name|html-esc}">func <a href="/{Decl|url-pos}">{Name|html-esc}</a></h2>
- <p><code>{Decl|html}</code></p>
+ {# Name is a string - no need for FSet}
+ <h2 id="{Name|html-esc}">func <a href="/{Decl FSet|url-pos}">{Name|html-esc}</a></h2>
+ <p><code>{Decl FSet|html}</code></p>
{Doc|html-comment}
{.end}
{.end}
{.section Types}
{.repeated section @}
- <h2 id="{Type.Name|html-esc}">type <a href="/{Decl|url-pos}">{Type.Name|html-esc}</a></h2>
+ {# Type.Name is a string - no need for FSet}
+ <h2 id="{Type.Name FSet|html-esc}">type <a href="/{Decl FSet|url-pos}">{Type.Name FSet|html-esc}</a></h2>
{Doc|html-comment}
- <p><pre>{Decl|html}</pre></p>
+ <p><pre>{Decl FSet|html}</pre></p>
{.repeated section Consts}
{Doc|html-comment}
- <pre>{Decl|html}</pre>
+ <pre>{Decl FSet|html}</pre>
{.end}
{.repeated section Vars}
{Doc|html-comment}
- <pre>{Decl|html}</pre>
+ <pre>{Decl FSet|html}</pre>
{.end}
{.repeated section Factories}
- <h3 id="{Type.Name|html-esc}.{Name|html-esc}">func <a href="/{Decl|url-pos}">{Name|html-esc}</a></h3>
- <p><code>{Decl|html}</code></p>
+ <h3 id="{Type.Name FSet|html-esc}.{Name|html-esc}">func <a href="/{Decl FSet|url-pos}">{Name|html-esc}</a></h3>
+ <p><code>{Decl FSet|html}</code></p>
{Doc|html-comment}
{.end}
{.repeated section Methods}
- <h3 id="{Type.Name|html-esc}.{Name|html-esc}">func ({Recv|html}) <a href="/{Decl|url-pos}">{Name|html-esc}</a></h3>
- <p><code>{Decl|html}</code></p>
+ <h3 id="{Type.Name FSet|html-esc}.{Name|html-esc}">func ({Recv FSet|html}) <a href="/{Decl FSet|url-pos}">{Name|html-esc}</a></h3>
+ <p><code>{Decl FSet|html}</code></p>
{Doc|html-comment}
{.end}
{.end}
@@ -83,12 +87,14 @@
{.section PList}
<h2>Other packages</h2>
<p>
+ {# PLIst entries are strings - no need for FSet}
{.repeated section @}
- <a href="?p={@|html}">{@|html}</a><br />
+ <a href="?p={@|html-esc}">{@|html-esc}</a><br />
{.end}
</p>
{.end}
{.section Dirs}
+ {# DirList entries are numbers and strings - no need for FSet}
<h2 id="Subdirectories">Subdirectories</h2>
<p>
<table class="layout">
@@ -98,12 +104,12 @@
<th align="left">Synopsis</th>
</tr>
<tr>
- <th align="left"><a href="..">..<a></th>
+ <th align="left"><a href="..">..</a></th>
</tr>
{.repeated section List}
<tr>
{Depth|padding}
- <td align="left" colspan="{Height|html-esc}"><a href="{Path|html-esc}">{Name|html-esc}<a></td>
+ <td align="left" colspan="{Height|html-esc}"><a href="{Path|html-esc}">{Name|html-esc}</a></td>
<td></td>
<td align="left">{Synopsis|html-esc}</td>
</tr>
diff --git a/lib/godoc/package.txt b/lib/godoc/package.txt
index 124771edd..6fe992dbe 100644
--- a/lib/godoc/package.txt
+++ b/lib/godoc/package.txt
@@ -1,5 +1,5 @@
{.section PAst}
-{@}
+{@ FSet}
{.end}
{.section PDoc}
{.section IsPkg}
@@ -12,14 +12,14 @@ COMMAND DOCUMENTATION
{.end}
{.section Doc}
-{@}
+{@ FSet}
{.end}
{.section Consts}
CONSTANTS
{.repeated section @}
-{Decl}
+{Decl FSet}
{Doc}
{.end}
{.end}
@@ -28,7 +28,7 @@ CONSTANTS
VARIABLES
{.repeated section @}
-{Decl}
+{Decl FSet}
{Doc}
{.end}
{.end}
@@ -37,7 +37,7 @@ VARIABLES
FUNCTIONS
{.repeated section @}
-{Decl}
+{Decl FSet}
{Doc}
{.end}
{.end}
@@ -46,22 +46,22 @@ FUNCTIONS
TYPES
{.repeated section @}
-{Decl}
+{Decl FSet}
{Doc}
{.repeated section Consts}
-{Decl}
+{Decl FSet}
{Doc}
{.end}
{.repeated section Vars}
-{Decl}
+{Decl FSet}
{Doc}
{.end}
{.repeated section Factories}
-{Decl}
+{Decl FSet}
{Doc}
{.end}
{.repeated section Methods}
-{Decl}
+{Decl FSet}
{Doc}
{.end}
{.end}
diff --git a/lib/godoc/search.html b/lib/godoc/search.html
index febd7e569..3d3dd1958 100644
--- a/lib/godoc/search.html
+++ b/lib/godoc/search.html
@@ -4,10 +4,9 @@
license that can be found in the LICENSE file.
-->
-{.section Accurate}
-{.or}
+{.section Alert}
<p>
- <span class="alert" style="font-size:120%">Indexing in progress - result may be inaccurate</span>
+ <span class="alert" style="font-size:120%">{@}</span>
</p>
{.end}
{.section Alt}
@@ -26,8 +25,8 @@
{.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>
+ <a href="/{File.Path|url-src}?h={Query|urlquery-esc}#L{@|infoLine}">{File.Path|url-src}:{@|infoLine}</a>
+ {@|infoSnippet}
{.end}
{.end}
{.end}
@@ -38,7 +37,7 @@
{.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>
+ <a href="/{File.Path|url-src}?h={Query|urlquery-esc}">{File.Path|url-src}</a>
<table class="layout">
{.repeated section Groups}
<tr>
@@ -47,7 +46,7 @@
<td align="left" width="4"></td>
<td>
{.repeated section Infos}
- <a href="/{File.Path|url-src}?h={Query|html-esc}#L{@|infoLine}">{@|infoLine}</a>
+ <a href="/{File.Path|url-src}?h={Query|urlquery-esc}#L{@|infoLine}">{@|infoLine}</a>
{.end}
</td>
</tr>
@@ -57,12 +56,36 @@
{.end}
{.end}
{.end}
-{.section Illegal}
- <p>
- <span class="alert" style="font-size:120%">Illegal query syntax</span>
- </p>
+{.section Textual}
+ {.section Complete}
+ <h2 id="Textual">{Found|html-esc} textual occurrences</h2>
+ {.or}
+ <h2 id="Textual">More than {Found|html-esc} textual occurrences</h2>
+ <p>
+ <span class="alert" style="font-size:120%">Not all files or lines containing "{Query|html-esc}" are shown.</span>
+ </p>
+ {.end}
<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>).
+ <table class="layout">
+ {.repeated section @}
+ <tr>
+ <td align="left" valign="top">
+ <a href="/{Filename|url-src}?h={Query|urlquery-esc}">{Filename|url-src}</a>:
+ </td>
+ <td align="left" width="4"></td>
+ <th align="left" valign="top">{Lines|numlines}</th>
+ <td align="left" width="4"></td>
+ <td align="left">
+ {.repeated section Lines}
+ <a href="/{Filename|url-src}?h={Query|urlquery-esc}#L{@|html-esc}">{@|html-esc}</a>
+ {.end}
+ </td>
+ </tr>
+ {.end}
+ {.section Complete}
+ {.or}
+ <tr><td align="left">...</td></tr>
+ {.end}
+ </table>
</p>
{.end}
diff --git a/lib/godoc/search.txt b/lib/godoc/search.txt
index 90266292c..eff4d36fc 100644
--- a/lib/godoc/search.txt
+++ b/lib/godoc/search.txt
@@ -1,9 +1,8 @@
QUERY
-{Query}
+ {Query}
-{.section Accurate}
-{.or}
-INDEXING IN PROGRESS - RESULT MAY BE INACCURATE
+{.section Alert}
+{@}
{.end}
{.section Alt}
@@ -45,9 +44,18 @@ package {Pak.Name}
{.end}
{.end}
{.end}
-{.section Illegal}
-ILLEGAL QUERY SYNTAX
+{.section Textual}
+{.section Complete}
+{Found} TEXTUAL OCCURENCES
+{.or}
+MORE THAN {Found} TEXTUAL OCCURENCES
+{.end}
-A legal query is a single identifier (such as ToLower)
-or a qualified identifier (such as math.Sin).
+{.repeated section @}
+{Lines|numlines} {Filename|url-src}
+{.end}
+{.section Complete}
+{.or}
+... ...
+{.end}
{.end}
diff --git a/lib/godoc/source.html b/lib/godoc/source.html
deleted file mode 100644
index 645517012..000000000
--- a/lib/godoc/source.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
- 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.
--->
-
-<script src="http://www.google.com/jsapi"></script>
-<script src="/doc/popups.js"></script>
-<script>
-var popup_data = [
-{.repeated section Data}
- '{@|popupInfo}',
-{.end}
-]
-
-google.load("jquery", "1");
-google.setOnLoadCallback(function() {.meta-left}
- godocs_bindPopups(popup_data);
-{.meta-right});
-</script>
-
-{# Source is HTML-escaped elsewhere}
-<pre>{Source}</pre>