2013-08-15 19:44:27 -06:00
|
|
|
|
// DO NOT EDIT ** This file was generated with the bake tool ** DO NOT EDIT //
|
|
|
|
|
|
2013-08-20 21:49:05 -06:00
|
|
|
|
package static
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2013-08-20 21:49:05 -06:00
|
|
|
|
var Files = map[string]string{
|
2014-03-14 16:58:22 -06:00
|
|
|
|
"callgraph.html": `<div class="toggle" style="display: none">
|
|
|
|
|
<div class="collapsed">
|
|
|
|
|
<p class="exampleHeading toggleButton">▹ <span class="text">Internal call graph</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="expanded">
|
|
|
|
|
<p class="exampleHeading toggleButton">▾ <span class="text">Internal call graph</span></p>
|
|
|
|
|
<p>
|
|
|
|
|
This viewer shows the portion of the internal call
|
|
|
|
|
graph of this package that is reachable from this function.
|
|
|
|
|
See the <a href='#pkg-callgraph'>package's call
|
|
|
|
|
graph</a> for more information.
|
|
|
|
|
</p>
|
|
|
|
|
<ul style="margin-left: 0.5in" id="callgraph-{{.Index}}" class="treeview"></ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
`,
|
|
|
|
|
|
2013-08-15 19:44:27 -06:00
|
|
|
|
"codewalk.html": `<!--
|
|
|
|
|
Copyright 2010 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.
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<style type='text/css'>@import "/doc/codewalk/codewalk.css";</style>
|
|
|
|
|
<script type="text/javascript" src="/doc/codewalk/codewalk.js"></script>
|
|
|
|
|
|
|
|
|
|
<div id="codewalk-main">
|
|
|
|
|
<div class="left" id="code-column">
|
|
|
|
|
<div id='sizer'></div>
|
|
|
|
|
<div id="code-area">
|
|
|
|
|
<div id="code-header" align="center">
|
|
|
|
|
<a id="code-popout-link" href="" target="_blank">
|
|
|
|
|
<img title="View code in new window" alt="Pop Out Code" src="/doc/codewalk/popout.png" style="display: block; float: right;"/>
|
|
|
|
|
</a>
|
|
|
|
|
<select id="code-selector">
|
|
|
|
|
{{range .File}}
|
|
|
|
|
<option value="/doc/codewalk/?fileprint=/{{urlquery .}}">{{html .}}</option>
|
|
|
|
|
{{end}}
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="code">
|
|
|
|
|
<iframe class="code-display" name="code-display" id="code-display"></iframe>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="code-options" class="setting">
|
|
|
|
|
<span>code on <a id="set-code-left" class="selected" href="#">left</a> • <a id="set-code-right" href="#">right</a></span>
|
|
|
|
|
<span>code width <span id="code-column-width">70%</span></span>
|
|
|
|
|
<span>filepaths <a id="show-filepaths" class="selected" href="#">shown</a> • <a id="hide-filepaths" href="#">hidden</a></span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="right" id="comment-column">
|
|
|
|
|
<div id="comment-area">
|
|
|
|
|
{{range .Step}}
|
|
|
|
|
<div class="comment first last">
|
2013-10-13 20:22:48 -06:00
|
|
|
|
<a class="comment-link" href="/doc/codewalk/?fileprint=/{{urlquery .File}}&lo={{urlquery .Lo}}&hi={{urlquery .Hi}}#mark" target="code-display"></a>
|
2013-08-15 19:44:27 -06:00
|
|
|
|
<div class="comment-title">{{html .Title}}</div>
|
|
|
|
|
<div class="comment-text">
|
|
|
|
|
{{with .Err}}
|
|
|
|
|
ERROR LOADING FILE: {{html .}}<br/><br/>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{.XML}}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="comment-text file-name"><span class="path-file">{{html .}}</span></div>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
<div id="comment-options" class="setting">
|
|
|
|
|
<a id="prev-comment" href="#"><span class="hotkey">p</span>revious step</a>
|
|
|
|
|
•
|
|
|
|
|
<a id="next-comment" href="#"><span class="hotkey">n</span>ext step</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
`,
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2013-08-15 19:44:27 -06:00
|
|
|
|
"codewalkdir.html": `<!--
|
|
|
|
|
Copyright 2010 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.
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<table class="layout">
|
|
|
|
|
{{range .}}
|
|
|
|
|
<tr>
|
|
|
|
|
{{$name_html := html .Name}}
|
|
|
|
|
<td><a href="{{$name_html}}">{{$name_html}}</a></td>
|
|
|
|
|
<td width="25"> </td>
|
|
|
|
|
<td>{{html .Title}}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
</table>
|
|
|
|
|
`,
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2013-08-15 19:44:27 -06:00
|
|
|
|
"dirlist.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.
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
<table class="layout">
|
|
|
|
|
<tr>
|
|
|
|
|
<th align="left">File</th>
|
|
|
|
|
<td width="25"> </td>
|
|
|
|
|
<th align="right">Bytes</th>
|
|
|
|
|
<td width="25"> </td>
|
|
|
|
|
<th align="left">Modified</th>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><a href="..">..</a></td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{range .}}
|
|
|
|
|
<tr>
|
|
|
|
|
{{$name_html := fileInfoName . | html}}
|
|
|
|
|
<td align="left"><a href="{{$name_html}}">{{$name_html}}</a></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td align="right">{{html .Size}}</td>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td align="left">{{fileInfoTime . | html}}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
</p>
|
|
|
|
|
`,
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2013-08-15 19:44:27 -06:00
|
|
|
|
"error.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.
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
<span class="alert" style="font-size:120%">{{html .}}</span>
|
|
|
|
|
</p>
|
|
|
|
|
`,
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2013-08-15 19:44:27 -06:00
|
|
|
|
"example.html": `<div id="example_{{.Name}}" class="toggle">
|
|
|
|
|
<div class="collapsed">
|
|
|
|
|
<p class="exampleHeading toggleButton">▹ <span class="text">Example{{example_suffix .Name}}</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="expanded">
|
|
|
|
|
<p class="exampleHeading toggleButton">▾ <span class="text">Example{{example_suffix .Name}}</span></p>
|
|
|
|
|
{{with .Doc}}<p>{{html .}}</p>{{end}}
|
|
|
|
|
{{$output := .Output}}
|
|
|
|
|
{{with .Play}}
|
|
|
|
|
<div class="play">
|
|
|
|
|
<div class="input"><textarea class="code">{{html .}}</textarea></div>
|
|
|
|
|
<div class="output"><pre>{{html $output}}</pre></div>
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<a class="run" title="Run this code [shift-enter]">Run</a>
|
|
|
|
|
<a class="fmt" title="Format this code">Format</a>
|
|
|
|
|
<a class="share" title="Share this code">Share</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{else}}
|
|
|
|
|
<p>Code:</p>
|
|
|
|
|
<pre class="code">{{.Code}}</pre>
|
|
|
|
|
{{with .Output}}
|
|
|
|
|
<p>Output:</p>
|
|
|
|
|
<pre class="output">{{html .}}</pre>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
`,
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2013-08-15 19:44:27 -06:00
|
|
|
|
"godoc.html": `<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
|
{{with .Tabtitle}}
|
|
|
|
|
<title>{{html .}} - The Go Programming Language</title>
|
|
|
|
|
{{else}}
|
|
|
|
|
<title>The Go Programming Language</title>
|
|
|
|
|
{{end}}
|
|
|
|
|
<link type="text/css" rel="stylesheet" href="/lib/godoc/style.css">
|
|
|
|
|
{{if .SearchBox}}
|
|
|
|
|
<link rel="search" type="application/opensearchdescription+xml" title="godoc" href="/opensearch.xml" />
|
|
|
|
|
{{end}}
|
2014-03-14 16:58:22 -06:00
|
|
|
|
<link rel="stylesheet" href="/lib/godoc/jquery.treeview.css">
|
2013-08-15 19:44:27 -06:00
|
|
|
|
<script type="text/javascript">window.initFuncs = [];</script>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
|
2014-03-14 16:58:22 -06:00
|
|
|
|
<div id="mainframe" style="position: fixed; bottom: 0; top:0; overflow: auto; width: 100%;">
|
2013-08-15 19:44:27 -06:00
|
|
|
|
<div id="topbar"{{if .Title}} class="wide"{{end}}><div class="container">
|
|
|
|
|
|
|
|
|
|
<form method="GET" action="/search">
|
|
|
|
|
<div id="menu">
|
|
|
|
|
<a href="/doc/">Documents</a>
|
|
|
|
|
<a href="/pkg/">Packages</a>
|
|
|
|
|
<a href="/project/">The Project</a>
|
|
|
|
|
<a href="/help/">Help</a>
|
2013-09-17 23:12:51 -06:00
|
|
|
|
<a href="/blog/">Blog</a>
|
2013-08-15 19:44:27 -06:00
|
|
|
|
{{if .Playground}}
|
|
|
|
|
<a id="playgroundButton" href="http://play.golang.org/" title="Show Go Playground">Play</a>
|
|
|
|
|
{{end}}
|
|
|
|
|
<input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
|
|
|
|
|
</div>
|
|
|
|
|
<div id="heading"><a href="/">The Go Programming Language</a></div>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
</div></div>
|
|
|
|
|
|
|
|
|
|
{{if .Playground}}
|
|
|
|
|
<div id="playground" class="play">
|
|
|
|
|
<div class="input"><textarea class="code">package main
|
|
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
fmt.Println("Hello, 世界")
|
|
|
|
|
}</textarea></div>
|
|
|
|
|
<div class="output"></div>
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<a class="run" title="Run this code [shift-enter]">Run</a>
|
|
|
|
|
<a class="fmt" title="Format this code">Format</a>
|
|
|
|
|
<a class="share" title="Share this code">Share</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
<div id="page"{{if .Title}} class="wide"{{end}}>
|
|
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
|
|
{{with .Title}}
|
|
|
|
|
<div id="plusone"><g:plusone size="small" annotation="none"></g:plusone></div>
|
|
|
|
|
<h1>{{html .}}</h1>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{with .Subtitle}}
|
|
|
|
|
<h2>{{html .}}</h2>
|
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
{{/* The Table of Contents is automatically inserted in this <div>.
|
|
|
|
|
Do not delete this <div>. */}}
|
|
|
|
|
<div id="nav"></div>
|
|
|
|
|
|
|
|
|
|
{{/* Body is HTML-escaped elsewhere */}}
|
|
|
|
|
{{printf "%s" .Body}}
|
|
|
|
|
|
|
|
|
|
<div id="footer">
|
|
|
|
|
Build version {{html .Version}}.<br>
|
2014-03-12 17:50:06 -06:00
|
|
|
|
Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
|
2013-08-15 19:44:27 -06:00
|
|
|
|
the content of this page is licensed under the
|
|
|
|
|
Creative Commons Attribution 3.0 License,
|
|
|
|
|
and code is licensed under a <a href="/LICENSE">BSD license</a>.<br>
|
|
|
|
|
<a href="/doc/tos.html">Terms of Service</a> |
|
|
|
|
|
<a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- .container -->
|
|
|
|
|
</div><!-- #page -->
|
|
|
|
|
|
2014-03-14 16:58:22 -06:00
|
|
|
|
</div><!-- #mainframe -->
|
|
|
|
|
<div id='lowframe' style="position: absolute; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
|
|
|
|
|
...
|
|
|
|
|
</div><!-- #lowframe -->
|
|
|
|
|
|
|
|
|
|
<!-- TODO(adonovan): load these from <head> using "defer" attribute? -->
|
2013-08-15 19:44:27 -06:00
|
|
|
|
<script type="text/javascript" src="/lib/godoc/jquery.js"></script>
|
2014-03-14 16:58:22 -06:00
|
|
|
|
<script type="text/javascript" src="/lib/godoc/jquery.treeview.js"></script>
|
|
|
|
|
<script type="text/javascript" src="/lib/godoc/jquery.treeview.edit.js"></script>
|
|
|
|
|
|
2013-08-15 19:44:27 -06:00
|
|
|
|
{{if .Playground}}
|
|
|
|
|
<script type="text/javascript" src="/lib/godoc/playground.js"></script>
|
|
|
|
|
{{end}}
|
|
|
|
|
<script type="text/javascript" src="/lib/godoc/godocs.js"></script>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
`,
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2013-08-15 19:44:27 -06:00
|
|
|
|
"godocs.js": `// Copyright 2012 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.
|
|
|
|
|
|
|
|
|
|
/* A little code to ease navigation of these documents.
|
|
|
|
|
*
|
|
|
|
|
* On window load we:
|
|
|
|
|
* + Bind search box hint placeholder show/hide events (bindSearchEvents)
|
|
|
|
|
* + Generate a table of contents (generateTOC)
|
|
|
|
|
* + Bind foldable sections (bindToggles)
|
|
|
|
|
* + Bind links to foldable sections (bindToggleLinks)
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
function bindSearchEvents() {
|
|
|
|
|
|
|
|
|
|
var search = $('#search');
|
|
|
|
|
if (search.length === 0) {
|
|
|
|
|
return; // no search box
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function clearInactive() {
|
|
|
|
|
if (search.is('.inactive')) {
|
|
|
|
|
search.val('');
|
|
|
|
|
search.removeClass('inactive');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function restoreInactive() {
|
|
|
|
|
if (search.val() !== '') {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
search.val(search.attr('placeholder'));
|
|
|
|
|
search.addClass('inactive');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
search.on('focus', clearInactive);
|
|
|
|
|
search.on('blur', restoreInactive);
|
|
|
|
|
|
|
|
|
|
restoreInactive();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Generates a table of contents: looks for h2 and h3 elements and generates
|
|
|
|
|
* links. "Decorates" the element with id=="nav" with this table of contents.
|
|
|
|
|
*/
|
|
|
|
|
function generateTOC() {
|
|
|
|
|
if ($('#manual-nav').length > 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var nav = $('#nav');
|
|
|
|
|
if (nav.length === 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var toc_items = [];
|
|
|
|
|
$(nav).nextAll('h2, h3').each(function() {
|
|
|
|
|
var node = this;
|
|
|
|
|
if (node.id == '')
|
|
|
|
|
node.id = 'tmp_' + toc_items.length;
|
|
|
|
|
var link = $('<a/>').attr('href', '#' + node.id).text($(node).text());
|
|
|
|
|
var item;
|
|
|
|
|
if ($(node).is('h2')) {
|
|
|
|
|
item = $('<dt/>');
|
|
|
|
|
} else { // h3
|
|
|
|
|
item = $('<dd/>');
|
|
|
|
|
}
|
|
|
|
|
item.append(link);
|
|
|
|
|
toc_items.push(item);
|
|
|
|
|
});
|
|
|
|
|
if (toc_items.length <= 1) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var dl1 = $('<dl/>');
|
|
|
|
|
var dl2 = $('<dl/>');
|
|
|
|
|
|
|
|
|
|
var split_index = (toc_items.length / 2) + 1;
|
|
|
|
|
if (split_index < 8) {
|
|
|
|
|
split_index = toc_items.length;
|
|
|
|
|
}
|
|
|
|
|
for (var i = 0; i < split_index; i++) {
|
|
|
|
|
dl1.append(toc_items[i]);
|
|
|
|
|
}
|
|
|
|
|
for (/* keep using i */; i < toc_items.length; i++) {
|
|
|
|
|
dl2.append(toc_items[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var tocTable = $('<table class="unruled"/>').appendTo(nav);
|
|
|
|
|
var tocBody = $('<tbody/>').appendTo(tocTable);
|
|
|
|
|
var tocRow = $('<tr/>').appendTo(tocBody);
|
|
|
|
|
|
|
|
|
|
// 1st column
|
|
|
|
|
$('<td class="first"/>').appendTo(tocRow).append(dl1);
|
|
|
|
|
// 2nd column
|
|
|
|
|
$('<td/>').appendTo(tocRow).append(dl2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function bindToggle(el) {
|
|
|
|
|
$('.toggleButton', el).click(function() {
|
|
|
|
|
if ($(el).is('.toggle')) {
|
|
|
|
|
$(el).addClass('toggleVisible').removeClass('toggle');
|
|
|
|
|
} else {
|
|
|
|
|
$(el).addClass('toggle').removeClass('toggleVisible');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function bindToggles(selector) {
|
|
|
|
|
$(selector).each(function(i, el) {
|
|
|
|
|
bindToggle(el);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function bindToggleLink(el, prefix) {
|
|
|
|
|
$(el).click(function() {
|
|
|
|
|
var href = $(el).attr('href');
|
|
|
|
|
var i = href.indexOf('#'+prefix);
|
|
|
|
|
if (i < 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var id = '#' + prefix + href.slice(i+1+prefix.length);
|
|
|
|
|
if ($(id).is('.toggle')) {
|
|
|
|
|
$(id).find('.toggleButton').first().click();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function bindToggleLinks(selector, prefix) {
|
|
|
|
|
$(selector).each(function(i, el) {
|
|
|
|
|
bindToggleLink(el, prefix);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setupDropdownPlayground() {
|
|
|
|
|
if (!$('#page').is('.wide')) {
|
|
|
|
|
return; // don't show on front page
|
|
|
|
|
}
|
|
|
|
|
var button = $('#playgroundButton');
|
|
|
|
|
var div = $('#playground');
|
|
|
|
|
var setup = false;
|
|
|
|
|
button.toggle(function() {
|
|
|
|
|
button.addClass('active');
|
|
|
|
|
div.show();
|
|
|
|
|
if (setup) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
setup = true;
|
|
|
|
|
playground({
|
|
|
|
|
'codeEl': $('.code', div),
|
|
|
|
|
'outputEl': $('.output', div),
|
|
|
|
|
'runEl': $('.run', div),
|
|
|
|
|
'fmtEl': $('.fmt', div),
|
|
|
|
|
'shareEl': $('.share', div),
|
|
|
|
|
'shareRedirect': 'http://play.golang.org/p/'
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
function() {
|
|
|
|
|
button.removeClass('active');
|
|
|
|
|
div.hide();
|
|
|
|
|
});
|
|
|
|
|
button.show();
|
|
|
|
|
$('#menu').css('min-width', '+=60');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setupInlinePlayground() {
|
|
|
|
|
'use strict';
|
|
|
|
|
// Set up playground when each element is toggled.
|
|
|
|
|
$('div.play').each(function (i, el) {
|
|
|
|
|
// Set up playground for this example.
|
|
|
|
|
var setup = function() {
|
|
|
|
|
var code = $('.code', el);
|
|
|
|
|
playground({
|
|
|
|
|
'codeEl': code,
|
|
|
|
|
'outputEl': $('.output', el),
|
|
|
|
|
'runEl': $('.run', el),
|
|
|
|
|
'fmtEl': $('.fmt', el),
|
|
|
|
|
'shareEl': $('.share', el),
|
|
|
|
|
'shareRedirect': 'http://play.golang.org/p/'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Make the code textarea resize to fit content.
|
|
|
|
|
var resize = function() {
|
|
|
|
|
code.height(0);
|
|
|
|
|
var h = code[0].scrollHeight;
|
|
|
|
|
code.height(h+20); // minimize bouncing.
|
|
|
|
|
code.closest('.input').height(h);
|
|
|
|
|
};
|
|
|
|
|
code.on('keydown', resize);
|
|
|
|
|
code.on('keyup', resize);
|
|
|
|
|
code.keyup(); // resize now.
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// If example already visible, set up playground now.
|
|
|
|
|
if ($(el).is(':visible')) {
|
|
|
|
|
setup();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Otherwise, set up playground when example is expanded.
|
|
|
|
|
var built = false;
|
|
|
|
|
$(el).closest('.toggle').click(function() {
|
|
|
|
|
// Only set up once.
|
|
|
|
|
if (!built) {
|
|
|
|
|
setup();
|
|
|
|
|
built = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// fixFocus tries to put focus to div#page so that keyboard navigation works.
|
|
|
|
|
function fixFocus() {
|
|
|
|
|
var page = $('div#page');
|
|
|
|
|
var topbar = $('div#topbar');
|
|
|
|
|
page.css('outline', 0); // disable outline when focused
|
|
|
|
|
page.attr('tabindex', -1); // and set tabindex so that it is focusable
|
|
|
|
|
$(window).resize(function (evt) {
|
|
|
|
|
// only focus page when the topbar is at fixed position (that is, it's in
|
|
|
|
|
// front of page, and keyboard event will go to the former by default.)
|
|
|
|
|
// by focusing page, keyboard event will go to page so that up/down arrow,
|
|
|
|
|
// space, etc. will work as expected.
|
|
|
|
|
if (topbar.css('position') == "fixed")
|
|
|
|
|
page.focus();
|
|
|
|
|
}).resize();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toggleHash() {
|
|
|
|
|
var hash = $(window.location.hash);
|
|
|
|
|
if (hash.is('.toggle')) {
|
|
|
|
|
hash.find('.toggleButton').first().click();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function addPlusButtons() {
|
|
|
|
|
var po = document.createElement('script');
|
|
|
|
|
po.type = 'text/javascript';
|
|
|
|
|
po.async = true;
|
2013-10-29 20:13:42 -06:00
|
|
|
|
po.src = 'https://apis.google.com/js/platform.js';
|
2013-08-15 19:44:27 -06:00
|
|
|
|
var s = document.getElementsByTagName('script')[0];
|
|
|
|
|
s.parentNode.insertBefore(po, s);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
bindSearchEvents();
|
|
|
|
|
generateTOC();
|
|
|
|
|
bindToggles(".toggle");
|
|
|
|
|
bindToggles(".toggleVisible");
|
|
|
|
|
bindToggleLinks(".exampleLink", "example_");
|
|
|
|
|
bindToggleLinks(".overviewLink", "");
|
|
|
|
|
bindToggleLinks(".examplesLink", "");
|
|
|
|
|
bindToggleLinks(".indexLink", "");
|
|
|
|
|
setupDropdownPlayground();
|
|
|
|
|
setupInlinePlayground();
|
|
|
|
|
fixFocus();
|
2014-03-14 16:58:22 -06:00
|
|
|
|
setupTypeInfo();
|
|
|
|
|
setupCallgraphs();
|
2013-08-15 19:44:27 -06:00
|
|
|
|
toggleHash();
|
|
|
|
|
addPlusButtons();
|
|
|
|
|
|
|
|
|
|
// godoc.html defines window.initFuncs in the <head> tag, and root.html and
|
|
|
|
|
// codewalk.js push their on-page-ready functions to the list.
|
|
|
|
|
// We execute those functions here, to avoid loading jQuery until the page
|
|
|
|
|
// content is loaded.
|
|
|
|
|
for (var i = 0; i < window.initFuncs.length; i++) window.initFuncs[i]();
|
|
|
|
|
});
|
|
|
|
|
|
2014-03-14 16:58:22 -06:00
|
|
|
|
// -- analysis ---------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
// escapeHTML returns HTML for s, with metacharacters quoted.
|
|
|
|
|
// It is safe for use in both elements and attributes
|
|
|
|
|
// (unlike the "set innerText, read innerHTML" trick).
|
|
|
|
|
function escapeHTML(s) {
|
|
|
|
|
return s.replace(/&/g, '&').
|
|
|
|
|
replace(/\"/g, '"').
|
|
|
|
|
replace(/\'/g, ''').
|
|
|
|
|
replace(/</g, '<').
|
|
|
|
|
replace(/>/g, '>');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// makeAnchor returns HTML for an <a> element, given an anchorJSON object.
|
|
|
|
|
function makeAnchor(json) {
|
|
|
|
|
var html = escapeHTML(json.Text);
|
|
|
|
|
if (json.Href != "") {
|
|
|
|
|
html = "<a href='" + escapeHTML(json.Href) + "'>" + html + "</a>";
|
|
|
|
|
}
|
|
|
|
|
return html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showLowFrame(html) {
|
|
|
|
|
var lowframe = document.getElementById('lowframe');
|
|
|
|
|
lowframe.style.height = "200px";
|
|
|
|
|
lowframe.innerHTML = "<p style='text-align: left;'>" + html + "</p>\n" +
|
|
|
|
|
"<div onclick='hideLowFrame()' style='position: absolute; top: 0; right: 0; cursor: pointer;'>✘</div>"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
document.hideLowFrame = function() {
|
|
|
|
|
var lowframe = document.getElementById('lowframe');
|
|
|
|
|
lowframe.style.height = "0px";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// onClickCallers is the onclick action for the 'func' tokens of a
|
|
|
|
|
// function declaration.
|
|
|
|
|
document.onClickCallers = function(index) {
|
|
|
|
|
var data = document.ANALYSIS_DATA[index]
|
|
|
|
|
if (data.Callers.length == 1 && data.Callers[0].Sites.length == 1) {
|
|
|
|
|
document.location = data.Callers[0].Sites[0].Href; // jump to sole caller
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var html = "Callers of <code>" + escapeHTML(data.Callee) + "</code>:<br/>\n";
|
|
|
|
|
for (var i = 0; i < data.Callers.length; i++) {
|
|
|
|
|
var caller = data.Callers[i];
|
|
|
|
|
html += "<code>" + escapeHTML(caller.Func) + "</code>";
|
|
|
|
|
var sites = caller.Sites;
|
|
|
|
|
if (sites != null && sites.length > 0) {
|
|
|
|
|
html += " at line ";
|
|
|
|
|
for (var j = 0; j < sites.length; j++) {
|
|
|
|
|
if (j > 0) {
|
|
|
|
|
html += ", ";
|
|
|
|
|
}
|
|
|
|
|
html += "<code>" + makeAnchor(sites[j]) + "</code>";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
html += "<br/>\n";
|
|
|
|
|
}
|
|
|
|
|
showLowFrame(html);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// onClickCallees is the onclick action for the '(' token of a function call.
|
|
|
|
|
document.onClickCallees = function(index) {
|
|
|
|
|
var data = document.ANALYSIS_DATA[index]
|
|
|
|
|
if (data.Callees.length == 1) {
|
|
|
|
|
document.location = data.Callees[0].Href; // jump to sole callee
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var html = "Callees of this " + escapeHTML(data.Descr) + ":<br/>\n";
|
|
|
|
|
for (var i = 0; i < data.Callees.length; i++) {
|
|
|
|
|
html += "<code>" + makeAnchor(data.Callees[i]) + "</code><br/>\n";
|
|
|
|
|
}
|
|
|
|
|
showLowFrame(html);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// onClickTypeInfo is the onclick action for identifiers declaring a named type.
|
|
|
|
|
document.onClickTypeInfo = function(index) {
|
|
|
|
|
var data = document.ANALYSIS_DATA[index];
|
|
|
|
|
var html = "Type <code>" + data.Name + "</code>: " +
|
|
|
|
|
" <small>(size=" + data.Size + ", align=" + data.Align + ")</small><br/>\n";
|
|
|
|
|
html += implementsHTML(data);
|
|
|
|
|
html += methodsetHTML(data);
|
|
|
|
|
showLowFrame(html);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// implementsHTML returns HTML for the implements relation of the
|
|
|
|
|
// specified TypeInfoJSON value.
|
|
|
|
|
function implementsHTML(info) {
|
|
|
|
|
var html = "";
|
|
|
|
|
if (info.ImplGroups != null) {
|
|
|
|
|
for (var i = 0; i < info.ImplGroups.length; i++) {
|
|
|
|
|
var group = info.ImplGroups[i];
|
|
|
|
|
var x = "<code>" + escapeHTML(group.Descr) + "</code> ";
|
|
|
|
|
for (var j = 0; j < group.Facts.length; j++) {
|
|
|
|
|
var fact = group.Facts[j];
|
|
|
|
|
var y = "<code>" + makeAnchor(fact.Other) + "</code>";
|
|
|
|
|
if (fact.ByKind != null) {
|
|
|
|
|
html += escapeHTML(fact.ByKind) + " type " + y + " implements " + x;
|
|
|
|
|
} else {
|
|
|
|
|
html += x + " implements " + y;
|
|
|
|
|
}
|
|
|
|
|
html += "<br/>\n";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// methodsetHTML returns HTML for the methodset of the specified
|
|
|
|
|
// TypeInfoJSON value.
|
|
|
|
|
function methodsetHTML(info) {
|
|
|
|
|
var html = "";
|
|
|
|
|
if (info.Methods != null) {
|
|
|
|
|
for (var i = 0; i < info.Methods.length; i++) {
|
|
|
|
|
html += "<code>" + makeAnchor(info.Methods[i]) + "</code><br/>\n";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// onClickComm is the onclick action for channel "make" and "<-"
|
|
|
|
|
// send/receive tokens.
|
|
|
|
|
document.onClickComm = function(index) {
|
|
|
|
|
var ops = document.ANALYSIS_DATA[index].Ops
|
|
|
|
|
if (ops.length == 1) {
|
|
|
|
|
document.location = ops[0].Op.Href; // jump to sole element
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var html = "Operations on this channel:<br/>\n";
|
|
|
|
|
for (var i = 0; i < ops.length; i++) {
|
|
|
|
|
html += makeAnchor(ops[i].Op) + " by <code>" + escapeHTML(ops[i].Fn) + "</code><br/>\n";
|
|
|
|
|
}
|
|
|
|
|
if (ops.length == 0) {
|
|
|
|
|
html += "(none)<br/>\n";
|
|
|
|
|
}
|
|
|
|
|
showLowFrame(html);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$(window).load(function() {
|
|
|
|
|
// Scroll window so that first selection is visible.
|
|
|
|
|
// (This means we don't need to emit id='L%d' spans for each line.)
|
|
|
|
|
// TODO(adonovan): ideally, scroll it so that it's under the pointer,
|
|
|
|
|
// but I don't know how to get the pointer y coordinate.
|
|
|
|
|
var elts = document.getElementsByClassName("selection");
|
|
|
|
|
if (elts.length > 0) {
|
|
|
|
|
elts[0].scrollIntoView()
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// setupTypeInfo populates the "Implements" and "Method set" toggle for
|
|
|
|
|
// each type in the package doc.
|
|
|
|
|
function setupTypeInfo() {
|
|
|
|
|
for (var i in document.ANALYSIS_DATA) {
|
|
|
|
|
var data = document.ANALYSIS_DATA[i];
|
|
|
|
|
|
|
|
|
|
var el = document.getElementById("implements-" + i);
|
|
|
|
|
if (el != null) {
|
|
|
|
|
// el != null => data is TypeInfoJSON.
|
|
|
|
|
if (data.ImplGroups != null) {
|
|
|
|
|
el.innerHTML = implementsHTML(data);
|
|
|
|
|
el.parentNode.parentNode.style.display = "block";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var el = document.getElementById("methodset-" + i);
|
|
|
|
|
if (el != null) {
|
|
|
|
|
// el != null => data is TypeInfoJSON.
|
|
|
|
|
if (data.Methods != null) {
|
|
|
|
|
el.innerHTML = methodsetHTML(data);
|
|
|
|
|
el.parentNode.parentNode.style.display = "block";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setupCallgraphs() {
|
|
|
|
|
if (document.CALLGRAPH == null) {
|
|
|
|
|
return
|
|
|
|
|
}
|
2014-03-27 13:30:14 -06:00
|
|
|
|
document.getElementById("pkg-callgraph").style.display = "block";
|
|
|
|
|
|
2014-03-14 16:58:22 -06:00
|
|
|
|
var treeviews = document.getElementsByClassName("treeview");
|
|
|
|
|
for (var i in treeviews) {
|
|
|
|
|
var tree = treeviews[i];
|
|
|
|
|
if (tree.id == null || tree.id.indexOf("callgraph-") != 0) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
var id = tree.id.substring("callgraph-".length);
|
|
|
|
|
$(tree).treeview({collapsed: true, animated: "fast"});
|
|
|
|
|
document.cgAddChildren(tree, tree, [id]);
|
|
|
|
|
tree.parentNode.parentNode.style.display = "block";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
document.cgAddChildren = function(tree, ul, indices) {
|
|
|
|
|
if (indices != null) {
|
|
|
|
|
for (var i = 0; i < indices.length; i++) {
|
|
|
|
|
var li = cgAddChild(tree, ul, document.CALLGRAPH[indices[i]]);
|
|
|
|
|
if (i == indices.length - 1) {
|
|
|
|
|
$(li).addClass("last");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$(tree).treeview({animated: "fast", add: ul});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// cgAddChild adds an <li> element for document.CALLGRAPH node cgn to
|
|
|
|
|
// the parent <ul> element ul. tree is the tree's root <ul> element.
|
|
|
|
|
function cgAddChild(tree, ul, cgn) {
|
|
|
|
|
var li = document.createElement("li");
|
|
|
|
|
ul.appendChild(li);
|
|
|
|
|
li.className = "closed";
|
|
|
|
|
|
|
|
|
|
var code = document.createElement("code");
|
|
|
|
|
|
|
|
|
|
if (cgn.Callees != null) {
|
|
|
|
|
$(li).addClass("expandable");
|
|
|
|
|
|
|
|
|
|
// Event handlers and innerHTML updates don't play nicely together,
|
|
|
|
|
// hence all this explicit DOM manipulation.
|
|
|
|
|
var hitarea = document.createElement("div");
|
|
|
|
|
hitarea.className = "hitarea expandable-hitarea";
|
|
|
|
|
li.appendChild(hitarea);
|
|
|
|
|
|
|
|
|
|
li.appendChild(code);
|
|
|
|
|
|
|
|
|
|
var childUL = document.createElement("ul");
|
|
|
|
|
li.appendChild(childUL);
|
|
|
|
|
childUL.setAttribute('style', "display: none;");
|
|
|
|
|
|
|
|
|
|
var onClick = function() {
|
|
|
|
|
document.cgAddChildren(tree, childUL, cgn.Callees);
|
|
|
|
|
hitarea.removeEventListener('click', onClick)
|
|
|
|
|
};
|
|
|
|
|
hitarea.addEventListener('click', onClick);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
li.appendChild(code);
|
|
|
|
|
}
|
|
|
|
|
code.innerHTML += " " + makeAnchor(cgn.Func);
|
|
|
|
|
return li
|
|
|
|
|
}
|
|
|
|
|
|
2013-08-15 19:44:27 -06:00
|
|
|
|
})();
|
|
|
|
|
`,
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"images/minus.gif": "GIF89a\t\x00\t\x00\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\t\x00\t\x00\x00\b\"\x00\x03\b\x1cH\xf0\x9f\xc1\x83\xff\x04\"<\xa8pa\xc2\x00\xff\x00H\x94\xf8\xd0aE\x87\r\x17\x12\xdc\x18 \x00;",
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"images/plus.gif": "GIF89a\t\x00\t\x00\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\t\x00\t\x00\x00\b&\x00\x03\b\x1cH\xf0\x9f\xc1\x83\xff\x04\x1e\x04pP\xa1A\x86\x06\x15\x02\x9881a\x80\x85\r/>̈0#A\x82\x01\x01\x00;",
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"images/treeview-black-line.gif": "GIF89a\x10\x00\xf0\x06\xf7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x10\x00\xf0\x06\x00\b\xff\x00\xff\t\x1c\xf8\x0f\x00\xc1\x83\b\r\"\\X\x90\xe1B\x85\x0e\tB\x8c(p\"E\x8b\x111:\xd4\xc8\x10\x80Ǐ\x1f\x1fR\x948r G\x91%\x1b\xa6<\x990\xa5ʒ,\x0f\xc6$\xb9\xd2\xe5L\x936s\xd6\xdc\tSgO\x9e#oV\xf4\x19\x94\xe8E\xa3\x19\x91nTڑ)ʟP\x8b\x02=:5iեW\x9bf}*5*U\xafV\xc1b\x15\xab\x95,\u05ef]Ӣ]\x1bVm[\xb6c\xddƅ[Vn]\xbag\xdfꝻ\xf7n\u07fc|\x03\xfb\x15\fx\xb0\xe1\u0088[nUl\x96\xb1\xdd\xc42\x9d:\xc6;\xf9oe\u0097\x0fg\x86L\xb3q\xe4ş=w~\xbc\xb9thҧ)\xa7\xb6\xbc\x1askͯ9\xe3\x04=Zumַ]熽[\xf6PڳE\aG\xdd\xdbt\xf1\xd8Ƈ\xdbV\x8e\x9b\xb9n缡\xfb~Iܥ\xf5\xebسk\xdfν{\xf4\xdf\xc2\xc1W\xff\x17\xbf\x9c|s\xf3\xcf\xd1\u007f\xa7^\x9e\xfdy\xf7\xe9\xe1\xaf\x17*\u007f:\xfd\xfb\x92\x91\xeb?\xce_zr\xf5\xf6\xe5\xd7\x1f\x80\xff\xd5W ~\xc0\x11\xb8\x9f\u007f\v*8\xa0\x81\rB\xf8 \x82\xe1I\xc8\xe0\x84\x02^\xa8\xa1\x83\x1bZ\xc8\xe1\x87\x1e\x86H\xe1x\"f\b\xe2\x88\xed\xa1\xf8\x9e\x8a\xf1\xb18\x9f\x89%&\x
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"images/treeview-black.gif": "GIF89a`\x00\x85\x00\xa1\x01\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff!\xf9\x04\x01\x00\x00\x02\x00,\x00\x00\x00\x00`\x00\x85\x00\x00\x02\xfe\x94\x8f\xa9\xcb\xed\x0fE\x98\xc1ш\xb3ި\xf2\x0f\x86\x9a'\x96\xa6I\x9e\xeaʶ\xee\nIJ\xfc\xd6&\xb0\xe0\xf6\xfe\xe9\x82\xef\xe3\t#\xc0Cp\x88d\xe0f\xcbY\xf2\x89(\x1a\x8eP\xa8\xf4W\xcdNs\xda,\xd3\xd9\xedR\xc3^\xb2yl~\xa2\xd3\xc85[\xe8~\xabRF9\x8f\xbe\xb5o.\x96\tW?R\x12\a\x98\x80Gx\x88\x98\b\xf8E\xa3\xa826\xe8\x88\x01)yBY)\xf8\xe3Ą\xd9\xf3\xd7\tr\t\xea\xa9\x109\x9a\xc3hzڠ\xba\xfa\xd0\xea\xca\x1a{3\x9bY\x1b\x02\xebj\x98\xbb\xba\x1b\xcb\xd7\x00\x1c\xf5k\xdb{{\x8c\x9c\xac\x8cʸ\xac\xf4\xe9<\x9c\x87\x15\x9dp\xc5{\xdaD\xc3Y}]m]7\xfdM\r>>\x95j\x9e\xae\xbe\xceގd\xb8\x0e\xff+\xac@\u007f뛎o\xae?\xce\xef\x8e\x1d+\x15@P\xa2\xc6yKwМ\xb6\x18\x9a\x1aEKh0\x1c\xb9\x88\xa5\xd4\tt\x871\xa3\xc6d\x8d\x06\xe4\xe5\xdb豗\x9f>!O\x95\xfcv\xb2ZJ\x8e,\r\xa2C\b\xed[A\x991\xbb5d\xc8\xedaM\x9d\x15a\xf6T\xf8\xb2\xa5СDG\xadtvtY\xd2J\xf6:\x8cT\xb8q`-\xa9\xb3\xa8\x06\xfc\x17\x94b9\xa8?\xb5J\x83\xca)\xa7\xb3\x996\xbb\xd24\xdb-kѵlۺ}\v7.\x82\x02\x00;",
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"images/treeview-default-line.gif": "GIF89a\x10\x00\xf0\x06\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x10\x00\xf0\x06\x00\b\xff\x00\xff\t\x1cH\xb0\xa0A\x81\x01\x0e*\\x0!Ç\v\x1dB\x9cHP\"E\x8a\t3\xfe\xd3x\xb1aNj\x16?2\f)R!ɒ\x06O\xa2\xac\xb8rdˈ/M\xc6\xf48\xb3\xa0ʗ7[\xe6\\\xb9\x13eϒ?E\x06\xfd8\xb4cQ\x905m&e\xb9\x14aS\xa7O\x8fb|\xba\x91\xaaԉW!f}\xb8\xd5eT\xab`\xbf\x8am\xda\x15\xe6إee\x9eM\x9a\x96&ٰo\xd7\xd6l\x9b\x12.Z\xbbl\xf1\xce\xd5;\x93\xaeR\xb9}\xf9\xc6\xf4\xcb4\xaeỀ\a\vƹXgc\x9e\x8f}F\x06:Yhe\xa2\x97\xa9j\xde̹3\xd7\xccH\x133\x16\xed\x984dӒQSVm\x995f\xd7FAO\x85\x1d\xfap^ڳm\xefōUvo\xdeZ}\a\a\xfe\x99\xb8W݁\x8d\x9bE\xaeX\xb9Z棡\x97\x96~\x9azj뫱\xb7\xd6\xfe\x9a{l\xe7n\x11{\xff\xaf-\xbe\xfc\xed\xf1\xb9\xcd\xefF\xff\x9b\xfdp\xf7\xc5\xe1\x1fW\x9f\\\xfer\xfa\xcd\xed?\xc7\x1f\x9d\xfft\xff\xd5\x01x\x9d\x80\xd9\x11\xb8\x9d\x81\xdd!\xf8\x9d~ᝧ y\x0eF\xb8ރ\xe9IX\x1f\x85\xeda\xf8\x9e\x86\xf1q8\x9f\x85\xf9yx\x1f\x88\xfd\x91\xf8\x9f\x89\x01\xa28\xa0\x8a\x05\xb2x\xa0\x8b\t¸\xa0\x88\xfb\xc9
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"images/treeview-default.gif": "GIF89a`\x00\x85\x00\xa1\x03\x00\x00\x00\x00\x80\x80\x80\xbc\xbc\xbc\xff\xff\xff!\xf9\x04\x01\x00\x00\x03\x00,\x00\x00\x00\x00`\x00\x85\x00\x00\x02\xfe\x9c\x8f\xa9\xcb\xed\x0f\a\x98\xc0ш\xb3ި\xf2\x0f\x86\x9a'\x96\xa6I\x9e\xeaʶ\xee\x1aIJ\xfc\xd6f\xb0\xe0\xf6\xfe\xe9\xd2\xe1\xe3\t#>Rp\x88d\xe0(\x93\x01\ue64c\"\x8a@\xa9uz0^\xb7GCw;\x9c\x89\xc1\xe4\xb2\xd9yN\xab\xa5ߵ\xfb}j\xc3M\x82y\xb2\xae\x90\xdb\x13\x82\xfe\xa3\x8f\xb7\xf7\x11\b\xa2'h@x\xa8\xb8\xc8\xc8&F\xd3(\xf2e\x18\xf90Y\x19r\x89\xd9#\xc1\x84\x06\xb5\x89\xa1\x19\xaa1J*\x9asZ\xfa\x18\xa3\xeajE\xf9*\xeb\x12;k\x1bwې\x98\xfb\x97J\n\xf8\xe7w\xbb\xbbQkG̛\xac\xbc\xfc\xc6\xda\xca\xec\xe5\vM\x15\r\x8df\xa0e\xbd\xe4\te\xbcI}=\x9dU\xa5-\xcd\xec\xecm\xad\xbe\xce\xde\ueb81\xac\x1e\xff\v\xac+l;\x0fM\x9c\xfe\xfb~\xb0\xef/ :u\xa6\x96\x81\xe3\x17\xea \xc1N\x17\xba\x19\x1cWM\x1c6r\x12\x13 \xfc\xe6,\xa0\xc6b\x8d\x1c\xf5i\xcc\xc7\f$\xa6z\xf6DV2\x99\f%/\x95\x1d[\xde\x1aX.\xcfB\x991-.dR\xc1\xa1\xb2\x82;\xcd=\xa49-\xa3ˡD\x8b\x1eb9\xec\xe3\xca{\vH\x1a\x9du\xf1i\xa5\xa8R\x0f\xc1\xac\x88\xa5fV\xac\x14\xcf1l\xa23\x19O\xb1>{\x02='\xb4\xaaڵlۺ}˫\x00\x00;",
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"images/treeview-gray-line.gif": "GIF89a\x10\x00\xf0\x06\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x10\x00\xf0\x06\x00\b\xff\x00\xff\t\x1c\xf8/\x00\xc1\x83\b\r\"\\X\x90\xe1B\x85\x0e\tB\x8c(p\"E\x8b\x111:\xd4\xc80\x80Ǐ\x1f\x1fR\x948r G\x91%\x1b\xa6<\x990\xa5ʒ,\x0f\xc6$\xb9\xd2\xe5L\x936s\xd6\xdc\tSgO\x9e#oV\xf4\x19\x94\xe8E\xa3\x19\x91nTڑ)ʟP\x8b\x02=:5iեW\x9bf}*5*U\xafV\xc1b\x15\xab\x95,\u05ef]Ӣ]\x1bVm[\xb6c\xddƅ[Vn]\xbag\xdfꝻ\xf7n\u07fc|\x03\xfb\x15\fx\xb0\xe1\u0088[nUl\x96\xb1\xdd\xc42\x9d:\xc6;\xf9oe\u0097\x0fg\x86L\xb3q\xe4ş=w~\xbc\xb9thҧ)\xa7\xb6\xbc\x1askͯ9\xe3\x04=Zumַ]熽[\xf6PڳE\aG\xdd\xdbt\xf1\xd8Ƈ\xdbV\x8e\x9b\xb9n缡\xfb~Iܥ\xf5\xebسk\xdfν{\xf4\xdf\xc2\xc1W\xff\x17\xbf\x9c|s\xf3\xcf\xd1\u007f\xa7^\x9e\xfdy\xf7\xe9\xe1\xaf\x17*\u007f:\xfd\xfb\x92\x91\xeb?\xce_zr\xf5\xf6\xe5\xd7\x1f\x80\xff\xd5W ~\xc0\x11\xb8\x9f\u007f\v*8\xa0\x81\rB\xf8 \x82\xe1I\xc8\xe0\x84\x02^\xa8\xa1\x83\x1bZ\xc8\xe1\x87\x1e\x86H\xe1x\"f\b\xe2\x88\xed\xa1\xf8\x9e\x8a\xf1\xb18\x9f\x89%&\x18c\x85
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"images/treeview-gray.gif": "GIF89a`\x00\x85\x00\xa1\x03\x00\x00\x00\x00\x80\x80\x80\xbc\xbc\xbc\xff\xff\xff!\xf9\x04\x01\x00\x00\x03\x00,\x00\x00\x00\x00`\x00\x85\x00\x00\x02\xfe\x9c\x8f\xa9\xcb\xed\x0f\x87\x98\xc2ш\xb3ި\xf2\x0f\x86\x9a'\x96\xa6I\x9e\xeaʶ\xee\x1aIJ\xfc\xd6f\xb0\xe0\xf6\xfe\xe9\x03p\xf0\xf1\x86\x11\x1f\xd0 $*\x198\x80\xd39\x98%\x97Kc\x90\x8aUX\x91\xd9.W\xeb\xedJg\xe1\xf2\xb4,F\xab\xcfj*\xbb\xad|Ç\xf2\xb9*u\xb5\xef\xf0_\xfdh\xf2p\x01\xe67RRG\x98\xc0\x87\xb8\xc8\xd8H8F\xe3\xa8rv(\x89Aiy\x82\x99i\xf8\xf3\x04$\xc5ٓ#*\xb2Y::\x88\xca\x01\x19\xb3\xda\xf9\xaa\x19+;\v[\x1bRyې{\xab\xc8[\xeb;+\xd80\x8c\xf0K\xa8\xa8q여\xeb\xfc\f\rݺ\xfcz\x1a\xadz\x14u\xcdt\x90M\xbd\xda\xf4\x19E\xb6\xdd\xe7]\x8e\x9d\x87\xaen\xbcn\xdc\xea\x1e/?O_\xef\xd5,\x8f\xffJ\x81_\xec\x1c\x9c\x8fT@U\xee\x00\xdac7oZB\x81\xf1\xb6h\x93\xe7\xf0\x1b\xaapO\xc6E*\x17q\xa1\x81ms\x10\x19\xbaSx0\xa4ȑ$%\x90\xd4W\xf0\x9a?\x05+{\x9d|Y2fL\x90\r=\xae\xb3v\xd3&:\x8aPB\xedԉ\x11\xe86\x9c;\xe1\xc9<\x8a4\xe9*\x94똢sZ\xaa\xe5\x01\xa9\xd7$\xea\xb2z\vk-\xad\xb3\xb8\x96\xa2\xf9QhU\xb1ш\x06\xfd\x04\x8a\\P\x829\xd9\xfet\x8bѨҹt\xebڽ\x8b7\xaf\x82\x02\x00;",
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"implements.html": `<div class="toggle" style="display: none">
|
|
|
|
|
<div class="collapsed">
|
|
|
|
|
<p class="exampleHeading toggleButton">▹ <span class="text">Implements</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="expanded">
|
|
|
|
|
<p class="exampleHeading toggleButton">▾ <span class="text">Implements</span></p>
|
|
|
|
|
<div style="margin-left: 1in" id='implements-{{.Index}}'>...</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
`,
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"jquery.js": `/*! jQuery v1.8.2 jquery.com | jquery.org/license */
|
|
|
|
|
(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bZ(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b_(a,b,c){var d=bP.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ca(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bV[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bV[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bV[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bV[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bV[e]+"Width"))||0));return f}function cb(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0||d==null){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bQ.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ca(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(bS[a])return bS[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"jquery.treeview.css": `/* https://github.com/jzaefferer/jquery-treeview/blob/master/jquery.treeview.css */
|
|
|
|
|
/* License: MIT. */
|
|
|
|
|
.treeview, .treeview ul {
|
|
|
|
|
padding: 0;
|
|
|
|
|
margin: 0;
|
|
|
|
|
list-style: none;
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview ul {
|
|
|
|
|
background-color: white;
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview .hitarea {
|
|
|
|
|
background: url(images/treeview-default.gif) -64px -25px no-repeat;
|
|
|
|
|
height: 16px;
|
|
|
|
|
width: 16px;
|
|
|
|
|
margin-left: -16px;
|
|
|
|
|
float: left;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
/* fix for IE6 */
|
|
|
|
|
* html .hitarea {
|
|
|
|
|
display: inline;
|
|
|
|
|
float:none;
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview li {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 3px 0pt 3px 16px;
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview a.selected {
|
|
|
|
|
background-color: #eee;
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
#treecontrol { margin: 1em 0; display: none; }
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview .hover { color: red; cursor: pointer; }
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview li { background: url(images/treeview-default-line.gif) 0 0 no-repeat; }
|
|
|
|
|
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview .expandable-hitarea { background-position: -80px -3px; }
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview li.last { background-position: 0 -1766px }
|
|
|
|
|
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(images/treeview-default.gif); }
|
|
|
|
|
.treeview li.lastCollapsable { background-position: 0 -111px }
|
|
|
|
|
.treeview li.lastExpandable { background-position: -32px -67px }
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview-red li { background-image: url(images/treeview-red-line.gif); }
|
|
|
|
|
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(images/treeview-red.gif); }
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview-black li { background-image: url(images/treeview-black-line.gif); }
|
|
|
|
|
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(images/treeview-black.gif); }
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview-gray li { background-image: url(images/treeview-gray-line.gif); }
|
|
|
|
|
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(images/treeview-gray.gif); }
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview-famfamfam li { background-image: url(images/treeview-famfamfam-line.gif); }
|
|
|
|
|
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(images/treeview-famfamfam.gif); }
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.treeview .placeholder {
|
|
|
|
|
background: url(images/ajax-loader.gif) 0 0 no-repeat;
|
|
|
|
|
height: 16px;
|
|
|
|
|
width: 16px;
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
.filetree li { padding: 3px 0 2px 16px; }
|
|
|
|
|
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
|
|
|
|
|
.filetree span.folder { background: url(images/folder.gif) 0 0 no-repeat; }
|
|
|
|
|
.filetree li.expandable span.folder { background: url(images/folder-closed.gif) 0 0 no-repeat; }
|
|
|
|
|
.filetree span.file { background: url(images/file.gif) 0 0 no-repeat; }
|
|
|
|
|
`,
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"jquery.treeview.edit.js": `/* https://github.com/jzaefferer/jquery-treeview/blob/master/jquery.treeview.edit.js */
|
|
|
|
|
/* License: MIT. */
|
|
|
|
|
(function($) {
|
|
|
|
|
var CLASSES = $.treeview.classes;
|
|
|
|
|
var proxied = $.fn.treeview;
|
|
|
|
|
$.fn.treeview = function(settings) {
|
|
|
|
|
settings = $.extend({}, settings);
|
|
|
|
|
if (settings.add) {
|
|
|
|
|
return this.trigger("add", [settings.add]);
|
|
|
|
|
}
|
|
|
|
|
if (settings.remove) {
|
|
|
|
|
return this.trigger("remove", [settings.remove]);
|
|
|
|
|
}
|
|
|
|
|
return proxied.apply(this, arguments).bind("add", function(event, branches) {
|
|
|
|
|
$(branches).prev()
|
|
|
|
|
.removeClass(CLASSES.last)
|
|
|
|
|
.removeClass(CLASSES.lastCollapsable)
|
|
|
|
|
.removeClass(CLASSES.lastExpandable)
|
|
|
|
|
.find(">.hitarea")
|
|
|
|
|
.removeClass(CLASSES.lastCollapsableHitarea)
|
|
|
|
|
.removeClass(CLASSES.lastExpandableHitarea);
|
|
|
|
|
$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, $(this).data("toggler"));
|
|
|
|
|
}).bind("remove", function(event, branches) {
|
|
|
|
|
var prev = $(branches).prev();
|
|
|
|
|
var parent = $(branches).parent();
|
|
|
|
|
$(branches).remove();
|
|
|
|
|
prev.filter(":last-child").addClass(CLASSES.last)
|
|
|
|
|
.filter("." + CLASSES.expandable).replaceClass(CLASSES.last, CLASSES.lastExpandable).end()
|
|
|
|
|
.find(">.hitarea").replaceClass(CLASSES.expandableHitarea, CLASSES.lastExpandableHitarea).end()
|
|
|
|
|
.filter("." + CLASSES.collapsable).replaceClass(CLASSES.last, CLASSES.lastCollapsable).end()
|
|
|
|
|
.find(">.hitarea").replaceClass(CLASSES.collapsableHitarea, CLASSES.lastCollapsableHitarea);
|
|
|
|
|
if (parent.is(":not(:has(>))") && parent[0] != this) {
|
|
|
|
|
parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable)
|
|
|
|
|
parent.siblings(".hitarea").andSelf().remove();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
})(jQuery);
|
|
|
|
|
`,
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"jquery.treeview.js": `/*
|
|
|
|
|
* Treeview 1.4.1 - jQuery plugin to hide and show branches of a tree
|
|
|
|
|
*
|
|
|
|
|
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
|
|
|
|
|
* http://docs.jquery.com/Plugins/Treeview
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2007 Jörn Zaefferer
|
|
|
|
|
*
|
|
|
|
|
* Dual licensed under the MIT and GPL licenses:
|
|
|
|
|
* http://www.opensource.org/licenses/mit-license.php
|
|
|
|
|
* http://www.gnu.org/licenses/gpl.html
|
|
|
|
|
*
|
|
|
|
|
* Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $
|
|
|
|
|
*
|
|
|
|
|
*/
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
;(function($) {
|
2014-02-26 11:21:44 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
// TODO rewrite as a widget, removing all the extra plugins
|
|
|
|
|
$.extend($.fn, {
|
|
|
|
|
swapClass: function(c1, c2) {
|
|
|
|
|
var c1Elements = this.filter('.' + c1);
|
|
|
|
|
this.filter('.' + c2).removeClass(c2).addClass(c1);
|
|
|
|
|
c1Elements.removeClass(c1).addClass(c2);
|
|
|
|
|
return this;
|
|
|
|
|
},
|
|
|
|
|
replaceClass: function(c1, c2) {
|
|
|
|
|
return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
|
|
|
|
|
},
|
|
|
|
|
hoverClass: function(className) {
|
|
|
|
|
className = className || "hover";
|
|
|
|
|
return this.hover(function() {
|
|
|
|
|
$(this).addClass(className);
|
|
|
|
|
}, function() {
|
|
|
|
|
$(this).removeClass(className);
|
2013-09-17 23:12:51 -06:00
|
|
|
|
});
|
2014-03-27 13:30:14 -06:00
|
|
|
|
},
|
|
|
|
|
heightToggle: function(animated, callback) {
|
|
|
|
|
animated ?
|
|
|
|
|
this.animate({ height: "toggle" }, animated, callback) :
|
|
|
|
|
this.each(function(){
|
|
|
|
|
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
|
|
|
|
|
if(callback)
|
|
|
|
|
callback.apply(this, arguments);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
heightHide: function(animated, callback) {
|
|
|
|
|
if (animated) {
|
|
|
|
|
this.animate({ height: "hide" }, animated, callback);
|
|
|
|
|
} else {
|
|
|
|
|
this.hide();
|
|
|
|
|
if (callback)
|
|
|
|
|
this.each(callback);
|
2013-08-15 19:44:27 -06:00
|
|
|
|
}
|
2014-03-27 13:30:14 -06:00
|
|
|
|
},
|
|
|
|
|
prepareBranches: function(settings) {
|
|
|
|
|
if (!settings.prerendered) {
|
|
|
|
|
// mark last tree items
|
|
|
|
|
this.filter(":last-child:not(ul)").addClass(CLASSES.last);
|
|
|
|
|
// collapse whole tree, or only those marked as closed, anyway except those marked as open
|
|
|
|
|
this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
|
2013-08-15 19:44:27 -06:00
|
|
|
|
}
|
2014-03-27 13:30:14 -06:00
|
|
|
|
// return all items with sublists
|
|
|
|
|
return this.filter(":has(>ul)");
|
|
|
|
|
},
|
|
|
|
|
applyClasses: function(settings, toggler) {
|
|
|
|
|
// TODO use event delegation
|
|
|
|
|
this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) {
|
|
|
|
|
// don't handle click events on children, eg. checkboxes
|
|
|
|
|
if ( this == event.target )
|
|
|
|
|
toggler.apply($(this).next());
|
|
|
|
|
}).add( $("a", this) ).hoverClass();
|
|
|
|
|
|
|
|
|
|
if (!settings.prerendered) {
|
|
|
|
|
// handle closed ones first
|
|
|
|
|
this.filter(":has(>ul:hidden)")
|
|
|
|
|
.addClass(CLASSES.expandable)
|
|
|
|
|
.replaceClass(CLASSES.last, CLASSES.lastExpandable);
|
|
|
|
|
|
|
|
|
|
// handle open ones
|
|
|
|
|
this.not(":has(>ul:hidden)")
|
|
|
|
|
.addClass(CLASSES.collapsable)
|
|
|
|
|
.replaceClass(CLASSES.last, CLASSES.lastCollapsable);
|
|
|
|
|
|
|
|
|
|
// create hitarea if not present
|
|
|
|
|
var hitarea = this.find("div." + CLASSES.hitarea);
|
|
|
|
|
if (!hitarea.length)
|
|
|
|
|
hitarea = this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea);
|
|
|
|
|
hitarea.removeClass().addClass(CLASSES.hitarea).each(function() {
|
|
|
|
|
var classes = "";
|
|
|
|
|
$.each($(this).parent().attr("class").split(" "), function() {
|
|
|
|
|
classes += this + "-hitarea ";
|
|
|
|
|
});
|
|
|
|
|
$(this).addClass( classes );
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// apply event to hitarea
|
|
|
|
|
this.find("div." + CLASSES.hitarea).click( toggler );
|
|
|
|
|
},
|
|
|
|
|
treeview: function(settings) {
|
|
|
|
|
|
|
|
|
|
settings = $.extend({
|
|
|
|
|
cookieId: "treeview"
|
|
|
|
|
}, settings);
|
|
|
|
|
|
|
|
|
|
if ( settings.toggle ) {
|
|
|
|
|
var callback = settings.toggle;
|
|
|
|
|
settings.toggle = function() {
|
|
|
|
|
return callback.apply($(this).parent()[0], arguments);
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// factory for treecontroller
|
|
|
|
|
function treeController(tree, control) {
|
|
|
|
|
// factory for click handlers
|
|
|
|
|
function handler(filter) {
|
|
|
|
|
return function() {
|
|
|
|
|
// reuse toggle event handler, applying the elements to toggle
|
|
|
|
|
// start searching for all hitareas
|
|
|
|
|
toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
|
|
|
|
|
// for plain toggle, no filter is provided, otherwise we need to check the parent element
|
|
|
|
|
return filter ? $(this).parent("." + filter).length : true;
|
|
|
|
|
}) );
|
|
|
|
|
return false;
|
|
|
|
|
};
|
2013-08-15 19:44:27 -06:00
|
|
|
|
}
|
2014-03-27 13:30:14 -06:00
|
|
|
|
// click on first element to collapse tree
|
|
|
|
|
$("a:eq(0)", control).click( handler(CLASSES.collapsable) );
|
|
|
|
|
// click on second to expand tree
|
|
|
|
|
$("a:eq(1)", control).click( handler(CLASSES.expandable) );
|
|
|
|
|
// click on third to toggle tree
|
|
|
|
|
$("a:eq(2)", control).click( handler() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// handle toggle event
|
|
|
|
|
function toggler() {
|
|
|
|
|
$(this)
|
|
|
|
|
.parent()
|
|
|
|
|
// swap classes for hitarea
|
|
|
|
|
.find(">.hitarea")
|
|
|
|
|
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
|
|
|
|
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
|
|
|
|
|
.end()
|
|
|
|
|
// swap classes for parent li
|
|
|
|
|
.swapClass( CLASSES.collapsable, CLASSES.expandable )
|
|
|
|
|
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
|
|
|
|
// find child lists
|
|
|
|
|
.find( ">ul" )
|
|
|
|
|
// toggle them
|
|
|
|
|
.heightToggle( settings.animated, settings.toggle );
|
|
|
|
|
if ( settings.unique ) {
|
|
|
|
|
$(this).parent()
|
|
|
|
|
.siblings()
|
|
|
|
|
// swap classes for hitarea
|
|
|
|
|
.find(">.hitarea")
|
|
|
|
|
.replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
|
|
|
|
.replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
|
|
|
|
|
.end()
|
|
|
|
|
.replaceClass( CLASSES.collapsable, CLASSES.expandable )
|
|
|
|
|
.replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
|
|
|
|
.find( ">ul" )
|
|
|
|
|
.heightHide( settings.animated, settings.toggle );
|
2013-08-15 19:44:27 -06:00
|
|
|
|
}
|
2014-03-27 13:30:14 -06:00
|
|
|
|
}
|
|
|
|
|
this.data("toggler", toggler);
|
|
|
|
|
|
|
|
|
|
function serialize() {
|
|
|
|
|
function binary(arg) {
|
|
|
|
|
return arg ? 1 : 0;
|
|
|
|
|
}
|
|
|
|
|
var data = [];
|
|
|
|
|
branches.each(function(i, e) {
|
|
|
|
|
data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
|
|
|
|
|
});
|
|
|
|
|
$.cookie(settings.cookieId, data.join(""), settings.cookieOptions );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function deserialize() {
|
|
|
|
|
var stored = $.cookie(settings.cookieId);
|
|
|
|
|
if ( stored ) {
|
|
|
|
|
var data = stored.split("");
|
|
|
|
|
branches.each(function(i, e) {
|
|
|
|
|
$(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// add treeview class to activate styles
|
|
|
|
|
this.addClass("treeview");
|
|
|
|
|
|
|
|
|
|
// prepare branches and find all tree items with child lists
|
|
|
|
|
var branches = this.find("li").prepareBranches(settings);
|
|
|
|
|
|
|
|
|
|
switch(settings.persist) {
|
|
|
|
|
case "cookie":
|
|
|
|
|
var toggleCallback = settings.toggle;
|
|
|
|
|
settings.toggle = function() {
|
|
|
|
|
serialize();
|
|
|
|
|
if (toggleCallback) {
|
|
|
|
|
toggleCallback.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
deserialize();
|
|
|
|
|
break;
|
|
|
|
|
case "location":
|
|
|
|
|
var current = this.find("a").filter(function() {
|
|
|
|
|
return this.href.toLowerCase() == location.href.toLowerCase();
|
|
|
|
|
});
|
|
|
|
|
if ( current.length ) {
|
|
|
|
|
// TODO update the open/closed classes
|
|
|
|
|
var items = current.addClass("selected").parents("ul, li").add( current.next() ).show();
|
|
|
|
|
if (settings.prerendered) {
|
|
|
|
|
// if prerendered is on, replicate the basic class swapping
|
|
|
|
|
items.filter("li")
|
|
|
|
|
.swapClass( CLASSES.collapsable, CLASSES.expandable )
|
|
|
|
|
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
|
|
|
|
.find(">.hitarea")
|
|
|
|
|
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
|
|
|
|
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
branches.applyClasses(settings, toggler);
|
|
|
|
|
|
|
|
|
|
// if control option is set, create the treecontroller and show it
|
|
|
|
|
if ( settings.control ) {
|
|
|
|
|
treeController(this, settings.control);
|
|
|
|
|
$(settings.control).show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return this;
|
2013-08-15 19:44:27 -06:00
|
|
|
|
}
|
2014-03-27 13:30:14 -06:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// classes used by the plugin
|
|
|
|
|
// need to be styled via external stylesheet, see first example
|
|
|
|
|
$.treeview = {};
|
|
|
|
|
var CLASSES = ($.treeview.classes = {
|
|
|
|
|
open: "open",
|
|
|
|
|
closed: "closed",
|
|
|
|
|
expandable: "expandable",
|
|
|
|
|
expandableHitarea: "expandable-hitarea",
|
|
|
|
|
lastExpandableHitarea: "lastExpandable-hitarea",
|
|
|
|
|
collapsable: "collapsable",
|
|
|
|
|
collapsableHitarea: "collapsable-hitarea",
|
|
|
|
|
lastCollapsableHitarea: "lastCollapsable-hitarea",
|
|
|
|
|
lastCollapsable: "lastCollapsable",
|
|
|
|
|
lastExpandable: "lastExpandable",
|
|
|
|
|
last: "last",
|
|
|
|
|
hitarea: "hitarea"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})(jQuery);
|
|
|
|
|
`,
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"methodset.html": `<div class="toggle" style="display: none">
|
|
|
|
|
<div class="collapsed">
|
|
|
|
|
<p class="exampleHeading toggleButton">▹ <span class="text">Method set</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="expanded">
|
|
|
|
|
<p class="exampleHeading toggleButton">▾ <span class="text">Method set</span></p>
|
|
|
|
|
<div style="margin-left: 1in" id='methodset-{{.Index}}'>...</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
`,
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"opensearch.xml": `<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
|
|
|
|
<ShortName>godoc</ShortName>
|
|
|
|
|
<Description>The Go Programming Language</Description>
|
|
|
|
|
<Tags>go golang</Tags>
|
|
|
|
|
<Contact />
|
|
|
|
|
<Url type="text/html" template="{{.BaseURL}}/search?q={searchTerms}" />
|
|
|
|
|
<Image height="15" width="16" type="image/x-icon">/favicon.ico</Image>
|
|
|
|
|
<OutputEncoding>UTF-8</OutputEncoding>
|
|
|
|
|
<InputEncoding>UTF-8</InputEncoding>
|
|
|
|
|
</OpenSearchDescription>
|
|
|
|
|
`,
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"package.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.
|
|
|
|
|
-->
|
|
|
|
|
<!--
|
|
|
|
|
Note: Static (i.e., not template-generated) href and id
|
|
|
|
|
attributes start with "pkg-" to make it impossible for
|
|
|
|
|
them to conflict with generated attributes (some of which
|
|
|
|
|
correspond to Go identifiers).
|
|
|
|
|
-->
|
|
|
|
|
{{with .PDoc}}
|
|
|
|
|
<script type='text/javascript'>
|
|
|
|
|
document.ANALYSIS_DATA = {{$.AnalysisData}};
|
|
|
|
|
document.CALLGRAPH = {{$.CallGraph}};
|
|
|
|
|
</script>
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{if $.IsMain}}
|
|
|
|
|
{{/* command documentation */}}
|
|
|
|
|
{{comment_html .Doc}}
|
|
|
|
|
{{else}}
|
|
|
|
|
{{/* package documentation */}}
|
|
|
|
|
<div id="short-nav">
|
|
|
|
|
<dl>
|
|
|
|
|
<dd><code>import "{{html .ImportPath}}"</code></dd>
|
|
|
|
|
</dl>
|
|
|
|
|
<dl>
|
|
|
|
|
<dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd>
|
|
|
|
|
<dd><a href="#pkg-index" class="indexLink">Index</a></dd>
|
|
|
|
|
{{if $.Examples}}
|
|
|
|
|
<dd><a href="#pkg-examples" class="examplesLink">Examples</a></dd>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{if $.Dirs}}
|
|
|
|
|
<dd><a href="#pkg-subdirectories">Subdirectories</a></dd>
|
|
|
|
|
{{end}}
|
|
|
|
|
</dl>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- The package's Name is printed as title by the top-level template -->
|
|
|
|
|
<div id="pkg-overview" class="toggleVisible">
|
|
|
|
|
<div class="collapsed">
|
|
|
|
|
<h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="expanded">
|
|
|
|
|
<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
|
|
|
|
|
{{comment_html .Doc}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{example_html $ ""}}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
<div id="pkg-index" class="toggleVisible">
|
|
|
|
|
<div class="collapsed">
|
|
|
|
|
<h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="expanded">
|
|
|
|
|
<h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
<!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
|
|
|
|
|
<div id="manual-nav">
|
|
|
|
|
<dl>
|
|
|
|
|
{{if .Consts}}
|
|
|
|
|
<dd><a href="#pkg-constants">Constants</a></dd>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{if .Vars}}
|
|
|
|
|
<dd><a href="#pkg-variables">Variables</a></dd>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{range .Funcs}}
|
|
|
|
|
{{$name_html := html .Name}}
|
|
|
|
|
<dd><a href="#{{$name_html}}">{{node_html $ .Decl false}}</a></dd>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{range .Types}}
|
|
|
|
|
{{$tname_html := html .Name}}
|
|
|
|
|
<dd><a href="#{{$tname_html}}">type {{$tname_html}}</a></dd>
|
|
|
|
|
{{range .Funcs}}
|
|
|
|
|
{{$name_html := html .Name}}
|
|
|
|
|
<dd> <a href="#{{$name_html}}">{{node_html $ .Decl false}}</a></dd>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{range .Methods}}
|
|
|
|
|
{{$name_html := html .Name}}
|
|
|
|
|
<dd> <a href="#{{$tname_html}}.{{$name_html}}">{{node_html $ .Decl false}}</a></dd>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{if $.Notes}}
|
|
|
|
|
{{range $marker, $item := $.Notes}}
|
|
|
|
|
<dd><a href="#pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</a></dd>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</dl>
|
|
|
|
|
</div><!-- #manual-nav -->
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{if $.Examples}}
|
|
|
|
|
<div id="pkg-examples">
|
|
|
|
|
<h4>Examples</h4>
|
|
|
|
|
<dl>
|
|
|
|
|
{{range $.Examples}}
|
|
|
|
|
<dd><a class="exampleLink" href="#example_{{.Name}}">{{example_name .Name}}</a></dd>
|
|
|
|
|
{{end}}
|
|
|
|
|
</dl>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{with .Filenames}}
|
|
|
|
|
<h4>Package files</h4>
|
|
|
|
|
<p>
|
|
|
|
|
<span style="font-size:90%">
|
|
|
|
|
{{range .}}
|
|
|
|
|
<a href="{{.|srcLink|html}}">{{.|filename|html}}</a>
|
|
|
|
|
{{end}}
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div><!-- .expanded -->
|
|
|
|
|
</div><!-- #pkg-index -->
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
<div id="pkg-callgraph" class="toggle" style="display: none">
|
|
|
|
|
<div class="collapsed">
|
|
|
|
|
<h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
|
|
|
|
|
</div> <!-- .expanded -->
|
|
|
|
|
<div class="expanded">
|
|
|
|
|
<h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
|
|
|
|
|
<p>
|
|
|
|
|
In the call graph viewer below, each node
|
|
|
|
|
is a function belonging to this package
|
|
|
|
|
and its children are the functions it
|
|
|
|
|
calls—perhaps dynamically.
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
The root nodes are the entry points of the
|
|
|
|
|
package: functions that may be called from
|
|
|
|
|
outside the package.
|
|
|
|
|
There may be non-exported or anonymous
|
|
|
|
|
functions among them if they are called
|
|
|
|
|
dynamically from another package.
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
Click a node to visit that function's source code.
|
|
|
|
|
From there you can visit its callers by
|
|
|
|
|
clicking its declaring <code>func</code>
|
|
|
|
|
token.
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
Functions may be omitted if they were
|
|
|
|
|
determined to be unreachable in the
|
|
|
|
|
particular programs or tests that were
|
|
|
|
|
analyzed.
|
|
|
|
|
</p>
|
|
|
|
|
<!-- Zero means show all package entry points. -->
|
|
|
|
|
<ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
|
|
|
|
|
</script>
|
|
|
|
|
</div>
|
|
|
|
|
</div> <!-- #pkg-callgraph -->
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{with .Consts}}
|
|
|
|
|
<h2 id="pkg-constants">Constants</h2>
|
|
|
|
|
{{range .}}
|
|
|
|
|
<pre>{{node_html $ .Decl true}}</pre>
|
|
|
|
|
{{comment_html .Doc}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{with .Vars}}
|
|
|
|
|
<h2 id="pkg-variables">Variables</h2>
|
|
|
|
|
{{range .}}
|
|
|
|
|
<pre>{{node_html $ .Decl true}}</pre>
|
|
|
|
|
{{comment_html .Doc}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{range .Funcs}}
|
|
|
|
|
{{/* Name is a string - no need for FSet */}}
|
|
|
|
|
{{$name_html := html .Name}}
|
|
|
|
|
<h2 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a></h2>
|
|
|
|
|
<pre>{{node_html $ .Decl true}}</pre>
|
|
|
|
|
{{comment_html .Doc}}
|
|
|
|
|
{{example_html $ .Name}}
|
|
|
|
|
{{callgraph_html $ "" .Name}}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{end}}
|
|
|
|
|
{{range .Types}}
|
|
|
|
|
{{$tname := .Name}}
|
|
|
|
|
{{$tname_html := html .Name}}
|
|
|
|
|
<h2 id="{{$tname_html}}">type <a href="{{posLink_url $ .Decl}}">{{$tname_html}}</a></h2>
|
|
|
|
|
<pre>{{node_html $ .Decl true}}</pre>
|
|
|
|
|
{{comment_html .Doc}}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{range .Consts}}
|
|
|
|
|
<pre>{{node_html $ .Decl true}}</pre>
|
|
|
|
|
{{comment_html .Doc}}
|
|
|
|
|
{{end}}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{range .Vars}}
|
|
|
|
|
<pre>{{node_html $ .Decl true}}</pre>
|
|
|
|
|
{{comment_html .Doc}}
|
|
|
|
|
{{end}}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{example_html $ $tname}}
|
|
|
|
|
{{implements_html $ $tname}}
|
|
|
|
|
{{methodset_html $ $tname}}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{range .Funcs}}
|
|
|
|
|
{{$name_html := html .Name}}
|
|
|
|
|
<h3 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a></h3>
|
|
|
|
|
<pre>{{node_html $ .Decl true}}</pre>
|
|
|
|
|
{{comment_html .Doc}}
|
|
|
|
|
{{example_html $ .Name}}
|
|
|
|
|
{{callgraph_html $ "" .Name}}
|
|
|
|
|
{{end}}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{range .Methods}}
|
|
|
|
|
{{$name_html := html .Name}}
|
|
|
|
|
<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a></h3>
|
|
|
|
|
<pre>{{node_html $ .Decl true}}</pre>
|
|
|
|
|
{{comment_html .Doc}}
|
|
|
|
|
{{$name := printf "%s_%s" $tname .Name}}
|
|
|
|
|
{{example_html $ $name}}
|
|
|
|
|
{{callgraph_html $ .Recv .Name}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{with $.Notes}}
|
|
|
|
|
{{range $marker, $content := .}}
|
|
|
|
|
<h2 id="pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</h2>
|
|
|
|
|
<ul style="list-style: none; padding: 0;">
|
|
|
|
|
{{range .}}
|
|
|
|
|
<li><a href="{{posLink_url $ .}}">☞</a> {{html .Body}}</li>
|
|
|
|
|
{{end}}
|
|
|
|
|
</ul>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{with .PAst}}
|
|
|
|
|
{{range $filename, $ast := .}}
|
|
|
|
|
<a href="{{$filename|srcLink|html}}">{{$filename|filename|html}}</a>:<pre>{{node_html $ $ast false}}</pre>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
2013-12-17 15:32:51 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{with .Dirs}}
|
|
|
|
|
{{/* DirList entries are numbers and strings - no need for FSet */}}
|
|
|
|
|
{{if $.PDoc}}
|
|
|
|
|
<h2 id="pkg-subdirectories">Subdirectories</h2>
|
|
|
|
|
{{else}}
|
|
|
|
|
<div class="pkgGopher">
|
|
|
|
|
<img class="gopher" src="/doc/gopher/pkg.png"/>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
<table class="dir">
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Name</th>
|
|
|
|
|
<th> </th>
|
|
|
|
|
<th style="text-align: left; width: auto">Synopsis</th>
|
|
|
|
|
</tr>
|
|
|
|
|
{{if not $.DirFlat}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td><a href="..">..</a></td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{range .List}}
|
|
|
|
|
{{if $.DirFlat}}
|
|
|
|
|
{{if .HasPkg}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name"><a href="{{html .Path}}/">{{html .Path}}</a></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td style="width: auto">{{html .Synopsis}}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{else}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="name">{{repeat ` + "`" + ` ` + "`" + ` .Depth}}<a href="{{html .Path}}/">{{html .Name}}</a></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td style="width: auto">{{html .Synopsis}}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</table>
|
|
|
|
|
{{if $.PDoc}}{{else}}
|
|
|
|
|
<p>Need more packages? Check out the <a href="/wiki/SubRepositories">sub-repositories</a> and <a href="/wiki/Projects">other Go projects</a>.</p>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
`,
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"package.txt": `{{$info := .}}{{$filtered := .IsFiltered}}{{/*
|
2013-12-17 15:32:51 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
---------------------------------------
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{if $filtered}}{{range .PAst}}{{range .Decls}}{{node $info .}}{{end}}{{end}}{{else}}{{with .PAst}}{{range $filename, $ast := .}}{{$filename}}:
|
|
|
|
|
{{node $ $ast}}{{end}}{{end}}{{end}}{{/*
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
---------------------------------------
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{if and $filtered (not (or .PDoc .PAst))}}No match found.
|
|
|
|
|
{{end}}{{with .PDoc}}{{if $.IsMain}}COMMAND DOCUMENTATION
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{comment_text .Doc " " "\t"}}
|
|
|
|
|
{{else}}{{if not $filtered}}PACKAGE DOCUMENTATION
|
|
|
|
|
|
|
|
|
|
package {{.Name}}
|
|
|
|
|
import "{{.ImportPath}}"
|
|
|
|
|
|
|
|
|
|
{{comment_text .Doc " " "\t"}}
|
|
|
|
|
{{example_text $ "" " "}}{{end}}{{/*
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{with .Consts}}{{if not $filtered}}CONSTANTS
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{end}}{{range .}}{{node $ .Decl}}
|
|
|
|
|
{{comment_text .Doc " " "\t"}}
|
|
|
|
|
{{end}}{{end}}{{/*
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{with .Vars}}{{if not $filtered}}VARIABLES
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{end}}{{range .}}{{node $ .Decl}}
|
|
|
|
|
{{comment_text .Doc " " "\t"}}
|
|
|
|
|
{{end}}{{end}}{{/*
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{with .Funcs}}{{if not $filtered}}FUNCTIONS
|
|
|
|
|
|
|
|
|
|
{{end}}{{range .}}{{node $ .Decl}}
|
|
|
|
|
{{comment_text .Doc " " "\t"}}
|
|
|
|
|
{{example_text $ .Name " "}}{{end}}{{end}}{{/*
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{with .Types}}{{if not $filtered}}TYPES
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{end}}{{range .}}{{$tname := .Name}}{{node $ .Decl}}
|
|
|
|
|
{{comment_text .Doc " " "\t"}}
|
|
|
|
|
{{/*
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{if .Consts}}{{range .Consts}}{{node $ .Decl}}
|
|
|
|
|
{{comment_text .Doc " " "\t"}}
|
|
|
|
|
{{end}}{{end}}{{/*
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{if .Vars}}{{range .Vars}}{{node $ .Decl}}
|
|
|
|
|
{{comment_text .Doc " " "\t"}}
|
|
|
|
|
{{example_text $ .Name " "}}{{end}}{{end}}{{/*
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{if .Funcs}}{{range .Funcs}}{{node $ .Decl}}
|
|
|
|
|
{{comment_text .Doc " " "\t"}}
|
|
|
|
|
{{example_text $ .Name " "}}{{end}}{{end}}{{/*
|
2014-01-06 07:51:01 -07:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
---------------------------------------
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{if .Methods}}{{range .Methods}}{{node $ .Decl}}
|
|
|
|
|
{{comment_text .Doc " " "\t"}}
|
|
|
|
|
{{$name := printf "%s_%s" $tname .Name}}{{example_text $ $name " "}}{{end}}{{end}}{{/*
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{end}}{{end}}{{/*
|
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{if and $filtered (not (or .Consts (or .Vars (or .Funcs .Types))))}}No match found.
|
|
|
|
|
{{end}}{{/*
|
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{end}}{{/*
|
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{with $.Notes}}
|
|
|
|
|
{{range $marker, $content := .}}
|
|
|
|
|
{{$marker}}S
|
|
|
|
|
|
|
|
|
|
{{range $content}}{{comment_text .Body " " "\t"}}
|
|
|
|
|
{{end}}{{end}}{{end}}{{end}}{{/*
|
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{if not $filtered}}{{with .Dirs}}SUBDIRECTORIES
|
|
|
|
|
{{if $.DirFlat}}{{range .List}}{{if .HasPkg}}
|
|
|
|
|
{{.Path}}{{end}}{{end}}
|
|
|
|
|
{{else}}{{range .List}}
|
|
|
|
|
{{repeat ` + "`" + `. ` + "`" + ` .Depth}}{{.Name}}{{end}}
|
|
|
|
|
{{end}}{{end}}{{/*
|
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{end}}{{/*
|
|
|
|
|
Make sure there is no newline at the end of this file.
|
|
|
|
|
perl -i -pe 'chomp if eof' package.txt
|
|
|
|
|
*/}}
|
2014-01-06 07:51:01 -07:00
|
|
|
|
`,
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"play.js": `// Copyright 2012 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.
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function initPlayground(transport) {
|
|
|
|
|
"use strict";
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function text(node) {
|
|
|
|
|
var s = "";
|
|
|
|
|
for (var i = 0; i < node.childNodes.length; i++) {
|
|
|
|
|
var n = node.childNodes[i];
|
|
|
|
|
if (n.nodeType === 1) {
|
|
|
|
|
if (n.tagName === "BUTTON") continue
|
|
|
|
|
if (n.tagName === "SPAN" && n.className === "number") continue;
|
|
|
|
|
if (n.tagName === "DIV" || n.tagName == "BR") {
|
|
|
|
|
s += "\n";
|
|
|
|
|
}
|
|
|
|
|
s += text(n);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if (n.nodeType === 3) {
|
|
|
|
|
s += n.nodeValue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return s.replace("\xA0", " "); // replace non-breaking spaces
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function init(code) {
|
|
|
|
|
var output = document.createElement('div');
|
|
|
|
|
var outpre = document.createElement('pre');
|
|
|
|
|
var running;
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
if ($ && $(output).resizable) {
|
|
|
|
|
$(output).resizable({
|
|
|
|
|
handles: "n,w,nw",
|
|
|
|
|
minHeight: 27,
|
|
|
|
|
minWidth: 135,
|
|
|
|
|
maxHeight: 608,
|
|
|
|
|
maxWidth: 990
|
|
|
|
|
});
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function onKill() {
|
|
|
|
|
if (running) running.Kill();
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function onRun(e) {
|
|
|
|
|
onKill();
|
|
|
|
|
output.style.display = "block";
|
|
|
|
|
outpre.innerHTML = "";
|
|
|
|
|
run1.style.display = "none";
|
|
|
|
|
var options = {Race: e.shiftKey};
|
|
|
|
|
running = transport.Run(text(code), PlaygroundOutput(outpre), options);
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function onClose() {
|
|
|
|
|
onKill();
|
|
|
|
|
output.style.display = "none";
|
|
|
|
|
run1.style.display = "inline-block";
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
var run1 = document.createElement('button');
|
|
|
|
|
run1.innerHTML = 'Run';
|
|
|
|
|
run1.className = 'run';
|
|
|
|
|
run1.addEventListener("click", onRun, false);
|
|
|
|
|
var run2 = document.createElement('button');
|
|
|
|
|
run2.className = 'run';
|
|
|
|
|
run2.innerHTML = 'Run';
|
|
|
|
|
run2.addEventListener("click", onRun, false);
|
|
|
|
|
var kill = document.createElement('button');
|
|
|
|
|
kill.className = 'kill';
|
|
|
|
|
kill.innerHTML = 'Kill';
|
|
|
|
|
kill.addEventListener("click", onKill, false);
|
|
|
|
|
var close = document.createElement('button');
|
|
|
|
|
close.className = 'close';
|
|
|
|
|
close.innerHTML = 'Close';
|
|
|
|
|
close.addEventListener("click", onClose, false);
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
var button = document.createElement('div');
|
|
|
|
|
button.classList.add('buttons');
|
|
|
|
|
button.appendChild(run1);
|
|
|
|
|
// Hack to simulate insertAfter
|
|
|
|
|
code.parentNode.insertBefore(button, code.nextSibling);
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
var buttons = document.createElement('div');
|
|
|
|
|
buttons.classList.add('buttons');
|
|
|
|
|
buttons.appendChild(run2);
|
|
|
|
|
buttons.appendChild(kill);
|
|
|
|
|
buttons.appendChild(close);
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
output.classList.add('output');
|
|
|
|
|
output.appendChild(buttons);
|
|
|
|
|
output.appendChild(outpre);
|
|
|
|
|
output.style.display = "none";
|
|
|
|
|
code.parentNode.insertBefore(output, button.nextSibling);
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
var play = document.querySelectorAll('div.playground');
|
|
|
|
|
for (var i = 0; i < play.length; i++) {
|
|
|
|
|
init(play[i]);
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
}
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
`,
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"playground.js": `// Copyright 2012 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.
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
/*
|
|
|
|
|
In the absence of any formal way to specify interfaces in JavaScript,
|
|
|
|
|
here's a skeleton implementation of a playground transport.
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function Transport() {
|
|
|
|
|
// Set up any transport state (eg, make a websocket connnection).
|
|
|
|
|
return {
|
|
|
|
|
Run: function(body, output, options) {
|
|
|
|
|
// Compile and run the program 'body' with 'options'.
|
|
|
|
|
// Call the 'output' callback to display program output.
|
|
|
|
|
return {
|
|
|
|
|
Kill: function() {
|
|
|
|
|
// Kill the running program.
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
// The output callback is called multiple times, and each time it is
|
|
|
|
|
// passed an object of this form.
|
|
|
|
|
var write = {
|
|
|
|
|
Kind: 'string', // 'start', 'stdout', 'stderr', 'end'
|
|
|
|
|
Body: 'string' // content of write or end status message
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
// The first call must be of Kind 'start' with no body.
|
|
|
|
|
// Subsequent calls may be of Kind 'stdout' or 'stderr'
|
|
|
|
|
// and must have a non-null Body string.
|
|
|
|
|
// The final call should be of Kind 'end' with an optional
|
|
|
|
|
// Body string, signifying a failure ("killed", for example).
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
// The output callback must be of this form.
|
|
|
|
|
// See PlaygroundOutput (below) for an implementation.
|
|
|
|
|
function outputCallback(write) {
|
|
|
|
|
}
|
|
|
|
|
*/
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function HTTPTransport() {
|
|
|
|
|
'use strict';
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
// TODO(adg): support stderr
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function playback(output, events) {
|
|
|
|
|
var timeout;
|
|
|
|
|
output({Kind: 'start'});
|
|
|
|
|
function next() {
|
|
|
|
|
if (events.length === 0) {
|
|
|
|
|
output({Kind: 'end'});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var e = events.shift();
|
|
|
|
|
if (e.Delay === 0) {
|
|
|
|
|
output({Kind: 'stdout', Body: e.Message});
|
|
|
|
|
next();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
timeout = setTimeout(function() {
|
|
|
|
|
output({Kind: 'stdout', Body: e.Message});
|
|
|
|
|
next();
|
|
|
|
|
}, e.Delay / 1000000);
|
|
|
|
|
}
|
|
|
|
|
next();
|
|
|
|
|
return {
|
|
|
|
|
Stop: function() {
|
|
|
|
|
clearTimeout(timeout);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function error(output, msg) {
|
|
|
|
|
output({Kind: 'start'});
|
|
|
|
|
output({Kind: 'stderr', Body: msg});
|
|
|
|
|
output({Kind: 'end'});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var seq = 0;
|
|
|
|
|
return {
|
|
|
|
|
Run: function(body, output, options) {
|
|
|
|
|
seq++;
|
|
|
|
|
var cur = seq;
|
|
|
|
|
var playing;
|
|
|
|
|
$.ajax('/compile', {
|
|
|
|
|
type: 'POST',
|
|
|
|
|
data: {'version': 2, 'body': body},
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(data) {
|
|
|
|
|
if (seq != cur) return;
|
|
|
|
|
if (!data) return;
|
|
|
|
|
if (playing != null) playing.Stop();
|
|
|
|
|
if (data.Errors) {
|
|
|
|
|
error(output, data.Errors);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
playing = playback(output, data.Events);
|
|
|
|
|
},
|
|
|
|
|
error: function() {
|
|
|
|
|
error(output, 'Error communicating with remote server.');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return {
|
|
|
|
|
Kill: function() {
|
|
|
|
|
if (playing != null) playing.Stop();
|
|
|
|
|
output({Kind: 'end', Body: 'killed'});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
};
|
2013-08-15 19:44:27 -06:00
|
|
|
|
}
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function SocketTransport() {
|
|
|
|
|
'use strict';
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
var id = 0;
|
|
|
|
|
var outputs = {};
|
|
|
|
|
var started = {};
|
|
|
|
|
var websocket = new WebSocket('ws://' + window.location.host + '/socket');
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
websocket.onclose = function() {
|
|
|
|
|
console.log('websocket connection closed');
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
websocket.onmessage = function(e) {
|
|
|
|
|
var m = JSON.parse(e.data);
|
|
|
|
|
var output = outputs[m.Id];
|
|
|
|
|
if (output === null)
|
|
|
|
|
return;
|
|
|
|
|
if (!started[m.Id]) {
|
|
|
|
|
output({Kind: 'start'});
|
|
|
|
|
started[m.Id] = true;
|
|
|
|
|
}
|
|
|
|
|
output({Kind: m.Kind, Body: m.Body});
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function send(m) {
|
|
|
|
|
websocket.send(JSON.stringify(m));
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
return {
|
|
|
|
|
Run: function(body, output, options) {
|
|
|
|
|
var thisID = id+'';
|
|
|
|
|
id++;
|
|
|
|
|
outputs[thisID] = output;
|
|
|
|
|
send({Id: thisID, Kind: 'run', Body: body, Options: options});
|
|
|
|
|
return {
|
|
|
|
|
Kill: function() {
|
|
|
|
|
send({Id: thisID, Kind: 'kill'});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
};
|
2013-08-15 19:44:27 -06:00
|
|
|
|
}
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function PlaygroundOutput(el) {
|
|
|
|
|
'use strict';
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
return function(write) {
|
|
|
|
|
if (write.Kind == 'start') {
|
|
|
|
|
el.innerHTML = '';
|
|
|
|
|
return;
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
var cl = 'system';
|
|
|
|
|
if (write.Kind == 'stdout' || write.Kind == 'stderr')
|
|
|
|
|
cl = write.Kind;
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
var m = write.Body;
|
|
|
|
|
if (write.Kind == 'end')
|
|
|
|
|
m = '\nProgram exited' + (m?(': '+m):'.');
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
if (m.indexOf('IMAGE:') === 0) {
|
|
|
|
|
// TODO(adg): buffer all writes before creating image
|
|
|
|
|
var url = 'data:image/png;base64,' + m.substr(6);
|
|
|
|
|
var img = document.createElement('img');
|
|
|
|
|
img.src = url;
|
|
|
|
|
el.appendChild(img);
|
|
|
|
|
return;
|
|
|
|
|
}
|
2013-08-15 19:44:27 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
// ^L clears the screen.
|
|
|
|
|
var s = m.split('\x0c');
|
|
|
|
|
if (s.length > 1) {
|
|
|
|
|
el.innerHTML = '';
|
|
|
|
|
m = s.pop();
|
|
|
|
|
}
|
2013-09-17 23:12:51 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
m = m.replace(/&/g, '&');
|
|
|
|
|
m = m.replace(/</g, '<');
|
|
|
|
|
m = m.replace(/>/g, '>');
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
var needScroll = (el.scrollTop + el.offsetHeight) == el.scrollHeight;
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
var span = document.createElement('span');
|
|
|
|
|
span.className = cl;
|
|
|
|
|
span.innerHTML = m;
|
|
|
|
|
el.appendChild(span);
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
if (needScroll)
|
|
|
|
|
el.scrollTop = el.scrollHeight - el.offsetHeight;
|
|
|
|
|
}
|
2014-03-14 16:58:22 -06:00
|
|
|
|
}
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
(function() {
|
|
|
|
|
function lineHighlight(error) {
|
|
|
|
|
var regex = /prog.go:([0-9]+)/g;
|
|
|
|
|
var r = regex.exec(error);
|
|
|
|
|
while (r) {
|
|
|
|
|
$(".lines div").eq(r[1]-1).addClass("lineerror");
|
|
|
|
|
r = regex.exec(error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function highlightOutput(wrappedOutput) {
|
|
|
|
|
return function(write) {
|
|
|
|
|
if (write.Body) lineHighlight(write.Body);
|
|
|
|
|
wrappedOutput(write);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function lineClear() {
|
|
|
|
|
$(".lineerror").removeClass("lineerror");
|
|
|
|
|
}
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
// opts is an object with these keys
|
|
|
|
|
// codeEl - code editor element
|
|
|
|
|
// outputEl - program output element
|
|
|
|
|
// runEl - run button element
|
|
|
|
|
// fmtEl - fmt button element (optional)
|
|
|
|
|
// fmtImportEl - fmt "imports" checkbox element (optional)
|
|
|
|
|
// shareEl - share button element (optional)
|
|
|
|
|
// shareURLEl - share URL text input element (optional)
|
|
|
|
|
// shareRedirect - base URL to redirect to on share (optional)
|
|
|
|
|
// toysEl - toys select element (optional)
|
|
|
|
|
// enableHistory - enable using HTML5 history API (optional)
|
|
|
|
|
// transport - playground transport to use (default is HTTPTransport)
|
|
|
|
|
function playground(opts) {
|
|
|
|
|
var code = $(opts.codeEl);
|
|
|
|
|
var transport = opts['transport'] || new HTTPTransport();
|
|
|
|
|
var running;
|
|
|
|
|
|
|
|
|
|
// autoindent helpers.
|
|
|
|
|
function insertTabs(n) {
|
|
|
|
|
// find the selection start and end
|
|
|
|
|
var start = code[0].selectionStart;
|
|
|
|
|
var end = code[0].selectionEnd;
|
|
|
|
|
// split the textarea content into two, and insert n tabs
|
|
|
|
|
var v = code[0].value;
|
|
|
|
|
var u = v.substr(0, start);
|
|
|
|
|
for (var i=0; i<n; i++) {
|
|
|
|
|
u += "\t";
|
|
|
|
|
}
|
|
|
|
|
u += v.substr(end);
|
|
|
|
|
// set revised content
|
|
|
|
|
code[0].value = u;
|
|
|
|
|
// reset caret position after inserted tabs
|
|
|
|
|
code[0].selectionStart = start+n;
|
|
|
|
|
code[0].selectionEnd = start+n;
|
|
|
|
|
}
|
|
|
|
|
function autoindent(el) {
|
|
|
|
|
var curpos = el.selectionStart;
|
|
|
|
|
var tabs = 0;
|
|
|
|
|
while (curpos > 0) {
|
|
|
|
|
curpos--;
|
|
|
|
|
if (el.value[curpos] == "\t") {
|
|
|
|
|
tabs++;
|
|
|
|
|
} else if (tabs > 0 || el.value[curpos] == "\n") {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
insertTabs(tabs);
|
|
|
|
|
}, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function keyHandler(e) {
|
|
|
|
|
if (e.keyCode == 9) { // tab
|
|
|
|
|
insertTabs(1);
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (e.keyCode == 13) { // enter
|
|
|
|
|
if (e.shiftKey) { // +shift
|
|
|
|
|
run();
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
autoindent(e.target);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
code.unbind('keydown').bind('keydown', keyHandler);
|
|
|
|
|
var outdiv = $(opts.outputEl).empty();
|
|
|
|
|
var output = $('<pre/>').appendTo(outdiv);
|
|
|
|
|
|
|
|
|
|
function body() {
|
|
|
|
|
return $(opts.codeEl).val();
|
|
|
|
|
}
|
|
|
|
|
function setBody(text) {
|
|
|
|
|
$(opts.codeEl).val(text);
|
|
|
|
|
}
|
|
|
|
|
function origin(href) {
|
|
|
|
|
return (""+href).split("/").slice(0, 3).join("/");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var pushedEmpty = (window.location.pathname == "/");
|
|
|
|
|
function inputChanged() {
|
|
|
|
|
if (pushedEmpty) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
pushedEmpty = true;
|
|
|
|
|
$(opts.shareURLEl).hide();
|
|
|
|
|
window.history.pushState(null, "", "/");
|
|
|
|
|
}
|
|
|
|
|
function popState(e) {
|
|
|
|
|
if (e === null) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (e && e.state && e.state.code) {
|
|
|
|
|
setBody(e.state.code);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var rewriteHistory = false;
|
|
|
|
|
if (window.history && window.history.pushState && window.addEventListener && opts.enableHistory) {
|
|
|
|
|
rewriteHistory = true;
|
|
|
|
|
code[0].addEventListener('input', inputChanged);
|
|
|
|
|
window.addEventListener('popstate', popState);
|
|
|
|
|
}
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function setError(error) {
|
|
|
|
|
if (running) running.Kill();
|
|
|
|
|
lineClear();
|
|
|
|
|
lineHighlight(error);
|
|
|
|
|
output.empty().addClass("error").text(error);
|
|
|
|
|
}
|
|
|
|
|
function loading() {
|
|
|
|
|
lineClear();
|
|
|
|
|
if (running) running.Kill();
|
|
|
|
|
output.removeClass("error").text('Waiting for remote server...');
|
|
|
|
|
}
|
|
|
|
|
function run() {
|
|
|
|
|
loading();
|
|
|
|
|
running = transport.Run(body(), highlightOutput(PlaygroundOutput(output[0])));
|
|
|
|
|
}
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
function fmt() {
|
|
|
|
|
loading();
|
|
|
|
|
var data = {"body": body()};
|
|
|
|
|
if ($(opts.fmtImportEl).is(":checked")) {
|
|
|
|
|
data["imports"] = "true";
|
|
|
|
|
}
|
|
|
|
|
$.ajax("/fmt", {
|
|
|
|
|
data: data,
|
|
|
|
|
type: "POST",
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function(data) {
|
|
|
|
|
if (data.Error) {
|
|
|
|
|
setError(data.Error);
|
|
|
|
|
} else {
|
|
|
|
|
setBody(data.Body);
|
|
|
|
|
setError("");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
$(opts.runEl).click(run);
|
|
|
|
|
$(opts.fmtEl).click(fmt);
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
if (opts.shareEl !== null && (opts.shareURLEl !== null || opts.shareRedirect !== null)) {
|
|
|
|
|
var shareURL;
|
|
|
|
|
if (opts.shareURLEl) {
|
|
|
|
|
shareURL = $(opts.shareURLEl).hide();
|
|
|
|
|
}
|
|
|
|
|
var sharing = false;
|
|
|
|
|
$(opts.shareEl).click(function() {
|
|
|
|
|
if (sharing) return;
|
|
|
|
|
sharing = true;
|
|
|
|
|
var sharingData = body();
|
|
|
|
|
$.ajax("/share", {
|
|
|
|
|
processData: false,
|
|
|
|
|
data: sharingData,
|
|
|
|
|
type: "POST",
|
|
|
|
|
complete: function(xhr) {
|
|
|
|
|
sharing = false;
|
|
|
|
|
if (xhr.status != 200) {
|
|
|
|
|
alert("Server error; try again.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (opts.shareRedirect) {
|
|
|
|
|
window.location = opts.shareRedirect + xhr.responseText;
|
|
|
|
|
}
|
|
|
|
|
if (shareURL) {
|
|
|
|
|
var path = "/p/" + xhr.responseText;
|
|
|
|
|
var url = origin(window.location) + path;
|
|
|
|
|
shareURL.show().val(url).focus().select();
|
|
|
|
|
|
|
|
|
|
if (rewriteHistory) {
|
|
|
|
|
var historyData = {"code": sharingData};
|
|
|
|
|
window.history.pushState(historyData, "", path);
|
|
|
|
|
pushedEmpty = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (opts.toysEl !== null) {
|
|
|
|
|
$(opts.toysEl).bind('change', function() {
|
|
|
|
|
var toy = $(this).val();
|
|
|
|
|
$.ajax("/doc/play/"+toy, {
|
|
|
|
|
processData: false,
|
|
|
|
|
type: "GET",
|
|
|
|
|
complete: function(xhr) {
|
|
|
|
|
if (xhr.status != 200) {
|
|
|
|
|
alert("Server error; try again.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
setBody(xhr.responseText);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
window.playground = playground;
|
|
|
|
|
})();
|
|
|
|
|
`,
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"search.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.
|
|
|
|
|
-->
|
|
|
|
|
{{with .Alert}}
|
|
|
|
|
<p>
|
|
|
|
|
<span class="alert" style="font-size:120%">{{html .}}</span>
|
|
|
|
|
</p>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{with .Alt}}
|
|
|
|
|
<p>
|
|
|
|
|
<span class="alert" style="font-size:120%">Did you mean: </span>
|
|
|
|
|
{{range .Alts}}
|
|
|
|
|
<a href="search?q={{urlquery .}}" style="font-size:120%">{{html .}}</a>
|
|
|
|
|
{{end}}
|
|
|
|
|
</p>
|
|
|
|
|
{{end}}
|
|
|
|
|
`,
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"search.txt": `QUERY
|
|
|
|
|
{{.Query}}
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{with .Alert}}{{.}}
|
|
|
|
|
{{end}}{{/* .Alert */}}{{/*
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
---------------------------------------
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{with .Alt}}DID YOU MEAN
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{range .Alts}} {{.}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}{{/* .Alt */}}{{/*
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
---------------------------------------
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
*/}}{{with .Pak}}PACKAGE {{$.Query}}
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
{{range .}} {{pkgLink .Pak.Path}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}{{/* .Pak */}}{{/*
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{range $key, $val := .Idents}}{{if $val}}{{$key.Name}}
|
|
|
|
|
{{range $val.Idents}} {{.Path}}.{{.Name}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}{{end}}{{/* .Idents */}}{{/*
|
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{with .Hit}}{{with .Decls}}PACKAGE-LEVEL DECLARATIONS
|
|
|
|
|
|
|
|
|
|
{{range .}}package {{.Pak.Name}}
|
|
|
|
|
{{range $file := .Files}}{{range .Groups}}{{range .}} {{srcLink $file.File.Path}}:{{infoLine .}}{{end}}
|
|
|
|
|
{{end}}{{end}}{{/* .Files */}}
|
|
|
|
|
{{end}}{{end}}{{/* .Decls */}}{{/*
|
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{with .Others}}LOCAL DECLARATIONS AND USES
|
|
|
|
|
|
|
|
|
|
{{range .}}package {{.Pak.Name}}
|
|
|
|
|
{{range $file := .Files}}{{range .Groups}}{{range .}} {{srcLink $file.File.Path}}:{{infoLine .}}
|
|
|
|
|
{{end}}{{end}}{{end}}{{/* .Files */}}
|
|
|
|
|
{{end}}{{end}}{{/* .Others */}}{{end}}{{/* .Hit */}}{{/*
|
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
|
|
*/}}{{if .Textual}}{{if .Complete}}{{.Found}} TEXTUAL OCCURRENCES{{else}}MORE THAN {{.Found}} TEXTUAL OCCURRENCES{{end}}
|
|
|
|
|
|
|
|
|
|
{{range .Textual}}{{len .Lines}} {{srcLink .Filename}}
|
|
|
|
|
{{end}}{{if not .Complete}}... ...
|
|
|
|
|
{{end}}{{end}}
|
|
|
|
|
`,
|
|
|
|
|
|
|
|
|
|
"searchcode.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.
|
|
|
|
|
-->
|
|
|
|
|
{{$query_url := urlquery .Query}}
|
|
|
|
|
{{if not .Idents}}
|
|
|
|
|
{{with .Pak}}
|
|
|
|
|
<h2 id="Packages">Package {{html $.Query}}</h2>
|
|
|
|
|
<p>
|
|
|
|
|
<table class="layout">
|
|
|
|
|
{{range .}}
|
|
|
|
|
{{$pkg_html := pkgLink .Pak.Path | html}}
|
|
|
|
|
<tr><td><a href="/{{$pkg_html}}">{{$pkg_html}}</a></td></tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
</table>
|
|
|
|
|
</p>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{with .Hit}}
|
|
|
|
|
{{with .Decls}}
|
|
|
|
|
<h2 id="Global">Package-level declarations</h2>
|
|
|
|
|
{{range .}}
|
|
|
|
|
{{$pkg_html := pkgLink .Pak.Path | html}}
|
|
|
|
|
<h3 id="Global_{{$pkg_html}}">package <a href="/{{$pkg_html}}">{{html .Pak.Name}}</a></h3>
|
|
|
|
|
{{range .Files}}
|
|
|
|
|
{{$file := .File.Path}}
|
|
|
|
|
{{range .Groups}}
|
|
|
|
|
{{range .}}
|
|
|
|
|
{{$line := infoLine .}}
|
|
|
|
|
<a href="{{queryLink $file $query_url $line | html}}">{{$file}}:{{$line}}</a>
|
|
|
|
|
{{infoSnippet_html .}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{with .Others}}
|
|
|
|
|
<h2 id="Local">Local declarations and uses</h2>
|
|
|
|
|
{{range .}}
|
|
|
|
|
{{$pkg_html := pkgLink .Pak.Path | html}}
|
|
|
|
|
<h3 id="Local_{{$pkg_html}}">package <a href="/{{$pkg_html}}">{{html .Pak.Name}}</a></h3>
|
|
|
|
|
{{range .Files}}
|
|
|
|
|
{{$file := .File.Path}}
|
|
|
|
|
<a href="{{queryLink $file $query_url 0 | html}}">{{$file}}</a>
|
|
|
|
|
<table class="layout">
|
|
|
|
|
{{range .Groups}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="25"></td>
|
|
|
|
|
<th align="left" valign="top">{{index . 0 | infoKind_html}}</th>
|
|
|
|
|
<td align="left" width="4"></td>
|
|
|
|
|
<td>
|
|
|
|
|
{{range .}}
|
|
|
|
|
{{$line := infoLine .}}
|
|
|
|
|
<a href="{{queryLink $file $query_url $line | html}}">{{$line}}</a>
|
|
|
|
|
{{end}}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
</table>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
2014-03-14 16:58:22 -06:00
|
|
|
|
`,
|
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
"searchdoc.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.
|
|
|
|
|
-->
|
|
|
|
|
{{range $key, $val := .Idents}}
|
|
|
|
|
{{if $val}}
|
|
|
|
|
<h2 id="Global">{{$key.Name}}</h2>
|
|
|
|
|
{{range $val}}
|
|
|
|
|
{{$pkg_html := pkgLink .Path | html}}
|
|
|
|
|
{{if eq "Packages" $key.Name}}
|
|
|
|
|
<a href="/{{$pkg_html}}">{{html .Path}}</a>
|
|
|
|
|
{{else}}
|
|
|
|
|
{{$doc_html := docLink .Path .Name| html}}
|
|
|
|
|
<a href="/{{$pkg_html}}">{{html .Package}}</a>.<a href="{{$doc_html}}">{{.Name}}</a>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{if .Doc}}
|
|
|
|
|
<p>{{comment_html .Doc}}</p>
|
|
|
|
|
{{else}}
|
|
|
|
|
<p><em>No documentation available</em></p>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
`,
|
|
|
|
|
|
|
|
|
|
"searchtxt.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.
|
|
|
|
|
-->
|
|
|
|
|
{{$query_url := urlquery .Query}}
|
|
|
|
|
{{with .Textual}}
|
|
|
|
|
{{if $.Complete}}
|
|
|
|
|
<h2 id="Textual">{{html $.Found}} textual occurrences</h2>
|
|
|
|
|
{{else}}
|
|
|
|
|
<h2 id="Textual">More than {{html $.Found}} textual occurrences</h2>
|
|
|
|
|
<p>
|
|
|
|
|
<span class="alert" style="font-size:120%">Not all files or lines containing "{{html $.Query}}" are shown.</span>
|
|
|
|
|
</p>
|
|
|
|
|
{{end}}
|
|
|
|
|
<p>
|
|
|
|
|
<table class="layout">
|
|
|
|
|
{{range .}}
|
|
|
|
|
{{$file := .Filename}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="left" valign="top">
|
|
|
|
|
<a href="{{queryLink $file $query_url 0}}">{{$file}}</a>:
|
|
|
|
|
</td>
|
|
|
|
|
<td align="left" width="4"></td>
|
|
|
|
|
<th align="left" valign="top">{{len .Lines}}</th>
|
|
|
|
|
<td align="left" width="4"></td>
|
|
|
|
|
<td align="left">
|
|
|
|
|
{{range .Lines}}
|
|
|
|
|
<a href="{{queryLink $file $query_url .}}">{{html .}}</a>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{if not $.Complete}}
|
|
|
|
|
...
|
|
|
|
|
{{end}}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{if not $.Complete}}
|
|
|
|
|
<tr><td align="left">...</td></tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
</table>
|
|
|
|
|
</p>
|
|
|
|
|
{{end}}
|
|
|
|
|
`,
|
|
|
|
|
|
|
|
|
|
"style.css": `body {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-family: Helvetica, Arial, sans-serif;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
}
|
|
|
|
|
pre,
|
|
|
|
|
code {
|
|
|
|
|
font-family: Menlo, monospace;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
pre {
|
|
|
|
|
line-height: 18px;
|
|
|
|
|
}
|
|
|
|
|
pre .comment {
|
|
|
|
|
color: #006600;
|
|
|
|
|
}
|
|
|
|
|
pre .highlight,
|
|
|
|
|
pre .highlight-comment,
|
|
|
|
|
pre .selection-highlight,
|
|
|
|
|
pre .selection-highlight-comment {
|
|
|
|
|
background: #FFFF00;
|
|
|
|
|
}
|
|
|
|
|
pre .selection,
|
|
|
|
|
pre .selection-comment {
|
|
|
|
|
background: #FF9632;
|
|
|
|
|
}
|
|
|
|
|
pre .ln {
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
body {
|
|
|
|
|
color: #222;
|
|
|
|
|
}
|
|
|
|
|
a,
|
|
|
|
|
.exampleHeading .text {
|
|
|
|
|
color: #375EAB;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
a:hover,
|
|
|
|
|
.exampleHeading .text:hover {
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
}
|
|
|
|
|
p,
|
|
|
|
|
pre,
|
|
|
|
|
ul,
|
|
|
|
|
ol {
|
|
|
|
|
margin: 20px;
|
|
|
|
|
}
|
|
|
|
|
pre {
|
|
|
|
|
background: #e9e9e9;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
|
|
|
|
-webkit-border-radius: 5px;
|
|
|
|
|
-moz-border-radius: 5px;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h1,
|
|
|
|
|
h2,
|
|
|
|
|
h3,
|
|
|
|
|
h4,
|
|
|
|
|
.rootHeading {
|
|
|
|
|
margin: 20px 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
color: #375EAB;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
h1 {
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
}
|
|
|
|
|
h2 {
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
background: #E0EBF5;
|
|
|
|
|
padding: 2px 5px;
|
|
|
|
|
}
|
|
|
|
|
h3 {
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
}
|
|
|
|
|
h3,
|
|
|
|
|
h4 {
|
|
|
|
|
margin: 20px 5px;
|
|
|
|
|
}
|
|
|
|
|
h4 {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
}
|
|
|
|
|
.rootHeading {
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dl {
|
|
|
|
|
margin: 20px;
|
|
|
|
|
}
|
|
|
|
|
dd {
|
|
|
|
|
margin: 2px 20px;
|
|
|
|
|
}
|
|
|
|
|
dl,
|
|
|
|
|
dd {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
div#nav table td {
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
table.dir th {
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
table.dir td {
|
|
|
|
|
word-wrap: break-word;
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
}
|
|
|
|
|
div#page.wide table.dir td.name {
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
.alert {
|
|
|
|
|
color: #AA0000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div#heading {
|
|
|
|
|
float: left;
|
|
|
|
|
margin: 0 0 10px 0;
|
|
|
|
|
padding: 21px 0;
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
}
|
|
|
|
|
div#heading a {
|
|
|
|
|
color: #222;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div#topbar {
|
|
|
|
|
background: #E0EBF5;
|
|
|
|
|
height: 64px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
div#page {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
div#page > .container,
|
|
|
|
|
div#topbar > .container {
|
|
|
|
|
text-align: left;
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
margin-right: auto;
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
width: 900px;
|
|
|
|
|
}
|
|
|
|
|
div#page.wide > .container,
|
|
|
|
|
div#topbar.wide > .container {
|
|
|
|
|
width: auto;
|
|
|
|
|
}
|
|
|
|
|
div#plusone {
|
|
|
|
|
float: right;
|
|
|
|
|
clear: right;
|
|
|
|
|
margin-top: 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div#footer {
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #666;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
margin: 40px 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div#menu > a,
|
|
|
|
|
div#menu > input,
|
|
|
|
|
div#learn .buttons a,
|
|
|
|
|
div.play .buttons a,
|
|
|
|
|
div#blog .read a {
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
|
|
|
|
-webkit-border-radius: 5px;
|
|
|
|
|
-moz-border-radius: 5px;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
div#playground .buttons a,
|
|
|
|
|
div#menu > a,
|
|
|
|
|
div#menu > input {
|
|
|
|
|
border: 1px solid #375EAB;
|
|
|
|
|
}
|
|
|
|
|
div#playground .buttons a,
|
|
|
|
|
div#menu > a {
|
|
|
|
|
color: white;
|
|
|
|
|
background: #375EAB;
|
|
|
|
|
}
|
|
|
|
|
#playgroundButton.active {
|
|
|
|
|
background: white;
|
|
|
|
|
color: #375EAB;
|
|
|
|
|
}
|
|
|
|
|
a#start,
|
|
|
|
|
div#learn .buttons a,
|
|
|
|
|
div.play .buttons a,
|
|
|
|
|
div#blog .read a {
|
|
|
|
|
color: #222;
|
|
|
|
|
border: 1px solid #375EAB;
|
|
|
|
|
background: #E0EBF5;
|
|
|
|
|
}
|
|
|
|
|
.download {
|
|
|
|
|
width: 150px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div#menu {
|
|
|
|
|
float: right;
|
|
|
|
|
min-width: 590px;
|
|
|
|
|
padding: 10px 0;
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
div#menu > a {
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
}
|
|
|
|
|
div#menu > input {
|
|
|
|
|
position: relative;
|
|
|
|
|
top: 1px;
|
|
|
|
|
width: 60px;
|
|
|
|
|
background: white;
|
|
|
|
|
color: #222;
|
|
|
|
|
}
|
|
|
|
|
div#menu > input.inactive {
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div.left {
|
|
|
|
|
float: left;
|
|
|
|
|
clear: left;
|
|
|
|
|
}
|
|
|
|
|
div.right {
|
|
|
|
|
float: right;
|
|
|
|
|
clear: right;
|
|
|
|
|
}
|
|
|
|
|
div.left,
|
|
|
|
|
div.right {
|
|
|
|
|
width: 415px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div#learn,
|
|
|
|
|
div#about {
|
|
|
|
|
padding-top: 20px;
|
|
|
|
|
}
|
|
|
|
|
div#learn h2,
|
|
|
|
|
div#about {
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
div#about {
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div#about {
|
|
|
|
|
height: 96px;
|
|
|
|
|
}
|
|
|
|
|
div#gopher {
|
|
|
|
|
background: url(/doc/gopher/frontpage.png) no-repeat;
|
|
|
|
|
background-position: center top;
|
|
|
|
|
height: 155px;
|
|
|
|
|
}
|
|
|
|
|
a#start {
|
|
|
|
|
display: block;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
|
|
-webkit-border-radius: 5px;
|
|
|
|
|
-moz-border-radius: 5px;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
a#start .big {
|
|
|
|
|
display: block;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
}
|
|
|
|
|
a#start .desc {
|
|
|
|
|
display: block;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
margin-top: 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div#learn .popout {
|
|
|
|
|
float: right;
|
|
|
|
|
display: block;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
background: url(/doc/share.png) no-repeat;
|
|
|
|
|
background-position: right top;
|
|
|
|
|
padding: 5px 27px;
|
|
|
|
|
}
|
|
|
|
|
div#learn pre,
|
|
|
|
|
div#learn textarea {
|
|
|
|
|
padding: 0;
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-family: Menlo, monospace;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
div#learn .input {
|
|
|
|
|
padding: 10px;
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
height: 150px;
|
|
|
|
|
|
|
|
|
|
-webkit-border-top-left-radius: 5px;
|
|
|
|
|
-webkit-border-top-right-radius: 5px;
|
|
|
|
|
-moz-border-radius-topleft: 5px;
|
|
|
|
|
-moz-border-radius-topright: 5px;
|
|
|
|
|
border-top-left-radius: 5px;
|
|
|
|
|
border-top-right-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
div#learn .input textarea {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
border: none;
|
|
|
|
|
outline: none;
|
|
|
|
|
resize: none;
|
|
|
|
|
}
|
|
|
|
|
div#learn .output {
|
|
|
|
|
border-top: none !important;
|
|
|
|
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
height: 59px;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
|
|
|
|
|
-webkit-border-bottom-right-radius: 5px;
|
|
|
|
|
-webkit-border-bottom-left-radius: 5px;
|
|
|
|
|
-moz-border-radius-bottomright: 5px;
|
|
|
|
|
-moz-border-radius-bottomleft: 5px;
|
|
|
|
|
border-bottom-right-radius: 5px;
|
|
|
|
|
border-bottom-left-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
div#learn .output pre {
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
|
|
-webkit-border-radius: 0;
|
|
|
|
|
-moz-border-radius: 0;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
}
|
|
|
|
|
div#learn .input,
|
|
|
|
|
div#learn .input textarea,
|
|
|
|
|
div#learn .output,
|
|
|
|
|
div#learn .output pre {
|
|
|
|
|
background: #FFFFD8;
|
|
|
|
|
}
|
|
|
|
|
div#learn .input,
|
|
|
|
|
div#learn .output {
|
|
|
|
|
border: 1px solid #375EAB;
|
|
|
|
|
}
|
|
|
|
|
div#learn .buttons {
|
|
|
|
|
float: right;
|
|
|
|
|
padding: 20px 0 10px 0;
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
div#learn .buttons a {
|
|
|
|
|
height: 16px;
|
|
|
|
|
margin-left: 5px;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
}
|
|
|
|
|
div#learn .toys {
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
}
|
|
|
|
|
div#learn .toys select {
|
|
|
|
|
border: 1px solid #375EAB;
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
div#learn .output .exit {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div#blog,
|
|
|
|
|
div#video {
|
|
|
|
|
margin-top: 40px;
|
|
|
|
|
}
|
|
|
|
|
div#blog > a,
|
|
|
|
|
div#blog > div,
|
|
|
|
|
div#blog > h2,
|
|
|
|
|
div#video > a,
|
|
|
|
|
div#video > div,
|
|
|
|
|
div#video > h2 {
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
div#blog .title,
|
|
|
|
|
div#video .title {
|
|
|
|
|
display: block;
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
}
|
|
|
|
|
div#blog .when {
|
|
|
|
|
color: #666;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
div#blog .read {
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.toggleButton { cursor: pointer; }
|
|
|
|
|
.toggle .collapsed { display: block; }
|
|
|
|
|
.toggle .expanded { display: none; }
|
|
|
|
|
.toggleVisible .collapsed { display: none; }
|
|
|
|
|
.toggleVisible .expanded { display: block; }
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
table.codetable { margin-left: auto; margin-right: auto; border-style: none; }
|
|
|
|
|
table.codetable td { padding-right: 10px; }
|
|
|
|
|
hr { border-style: none; border-top: 1px solid black; }
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
img.gopher {
|
|
|
|
|
float: right;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
z-index: -1;
|
|
|
|
|
}
|
|
|
|
|
.pkgGopher {
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
.pkgGopher .gopher {
|
|
|
|
|
float: none;
|
|
|
|
|
position: relative;
|
|
|
|
|
top: -40px;
|
|
|
|
|
margin-bottom: -120px;
|
|
|
|
|
}
|
|
|
|
|
h2 { clear: right; }
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
/* example and drop-down playground */
|
|
|
|
|
div.play {
|
|
|
|
|
padding: 0 20px 40px 20px;
|
|
|
|
|
}
|
|
|
|
|
div.play pre,
|
|
|
|
|
div.play textarea,
|
|
|
|
|
div.play .lines {
|
|
|
|
|
padding: 0;
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-family: Menlo, monospace;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
div.play .input {
|
|
|
|
|
padding: 10px;
|
|
|
|
|
margin-top: 10px;
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
-webkit-border-top-left-radius: 5px;
|
|
|
|
|
-webkit-border-top-right-radius: 5px;
|
|
|
|
|
-moz-border-radius-topleft: 5px;
|
|
|
|
|
-moz-border-radius-topright: 5px;
|
|
|
|
|
border-top-left-radius: 5px;
|
|
|
|
|
border-top-right-radius: 5px;
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
div.play .input textarea {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
border: none;
|
|
|
|
|
outline: none;
|
|
|
|
|
resize: none;
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
div#playground .input textarea {
|
|
|
|
|
overflow: auto;
|
|
|
|
|
resize: auto;
|
|
|
|
|
}
|
|
|
|
|
div.play .output {
|
|
|
|
|
border-top: none !important;
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
padding: 10px;
|
|
|
|
|
max-height: 200px;
|
|
|
|
|
overflow: auto;
|
2014-03-14 16:58:22 -06:00
|
|
|
|
|
2014-03-27 13:30:14 -06:00
|
|
|
|
-webkit-border-bottom-right-radius: 5px;
|
|
|
|
|
-webkit-border-bottom-left-radius: 5px;
|
|
|
|
|
-moz-border-radius-bottomright: 5px;
|
|
|
|
|
-moz-border-radius-bottomleft: 5px;
|
|
|
|
|
border-bottom-right-radius: 5px;
|
|
|
|
|
border-bottom-left-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
div.play .output pre {
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
|
|
-webkit-border-radius: 0;
|
|
|
|
|
-moz-border-radius: 0;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
}
|
|
|
|
|
div.play .input,
|
|
|
|
|
div.play .input textarea,
|
|
|
|
|
div.play .output,
|
|
|
|
|
div.play .output pre {
|
|
|
|
|
background: #FFFFD8;
|
|
|
|
|
}
|
|
|
|
|
div.play .input,
|
|
|
|
|
div.play .output {
|
|
|
|
|
border: 1px solid #375EAB;
|
|
|
|
|
}
|
|
|
|
|
div.play .buttons {
|
|
|
|
|
float: right;
|
|
|
|
|
padding: 20px 0 10px 0;
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
div.play .buttons a {
|
|
|
|
|
height: 16px;
|
|
|
|
|
margin-left: 5px;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
.output .stderr {
|
|
|
|
|
color: #933;
|
|
|
|
|
}
|
|
|
|
|
.output .system {
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* drop-down playground */
|
|
|
|
|
#playgroundButton,
|
|
|
|
|
div#playground {
|
|
|
|
|
/* start hidden; revealed by javascript */
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
div#playground {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 63px;
|
|
|
|
|
right: 20px;
|
|
|
|
|
padding: 0 10px 10px 10px;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
text-align: left;
|
|
|
|
|
background: #E0EBF5;
|
|
|
|
|
|
|
|
|
|
border: 1px solid #B0BBC5;
|
|
|
|
|
border-top: none;
|
|
|
|
|
|
|
|
|
|
-webkit-border-bottom-left-radius: 5px;
|
|
|
|
|
-webkit-border-bottom-right-radius: 5px;
|
|
|
|
|
-moz-border-radius-bottomleft: 5px;
|
|
|
|
|
-moz-border-radius-bottomright: 5px;
|
|
|
|
|
border-bottom-left-radius: 5px;
|
|
|
|
|
border-bottom-right-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
div#playground .code {
|
|
|
|
|
width: 520px;
|
|
|
|
|
height: 200px;
|
|
|
|
|
}
|
|
|
|
|
div#playground .output {
|
|
|
|
|
height: 100px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Inline runnable snippets (play.js/initPlayground) */
|
|
|
|
|
#content .code pre, #content .playground pre, #content .output pre {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
background: none;
|
|
|
|
|
border: none;
|
|
|
|
|
outline: 0px solid transparent;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
|
|
|
|
#content .playground .number, #content .code .number {
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
#content .code, #content .playground, #content .output {
|
|
|
|
|
width: auto;
|
|
|
|
|
margin: 20px;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
-webkit-border-radius: 5px;
|
|
|
|
|
-moz-border-radius: 5px;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
#content .code, #content .playground {
|
|
|
|
|
background: #e9e9e9;
|
|
|
|
|
}
|
|
|
|
|
#content .output {
|
|
|
|
|
background: #202020;
|
|
|
|
|
}
|
|
|
|
|
#content .output .stdout, #content .output pre {
|
|
|
|
|
color: #e6e6e6;
|
|
|
|
|
}
|
|
|
|
|
#content .output .stderr, #content .output .error {
|
|
|
|
|
color: rgb(244, 74, 63);
|
|
|
|
|
}
|
|
|
|
|
#content .output .system, #content .output .exit {
|
|
|
|
|
color: rgb(255, 209, 77)
|
|
|
|
|
}
|
|
|
|
|
#content .buttons {
|
|
|
|
|
position: relative;
|
|
|
|
|
float: right;
|
|
|
|
|
top: -50px;
|
|
|
|
|
right: 30px;
|
|
|
|
|
}
|
|
|
|
|
#content .output .buttons {
|
|
|
|
|
top: -60px;
|
|
|
|
|
right: 0;
|
|
|
|
|
height: 0;
|
|
|
|
|
}
|
|
|
|
|
#content .buttons .kill {
|
|
|
|
|
display: none;
|
|
|
|
|
visibility: hidden;
|
|
|
|
|
}
|
|
|
|
|
a.error {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: white;
|
|
|
|
|
background-color: darkred;
|
|
|
|
|
border-bottom-left-radius: 4px;
|
|
|
|
|
border-bottom-right-radius: 4px;
|
|
|
|
|
border-top-left-radius: 4px;
|
|
|
|
|
border-top-right-radius: 4px;
|
|
|
|
|
padding: 2px 4px 2px 4px; /* TRBL */
|
|
|
|
|
}`,
|
2013-08-15 19:44:27 -06:00
|
|
|
|
}
|