diff --git a/godoc/godoc.go b/godoc/godoc.go index 5add835fc3..86575f60f7 100644 --- a/godoc/godoc.go +++ b/godoc/godoc.go @@ -109,6 +109,9 @@ func (p *Presentation) initFuncMap() { // check whether to display third party section or not "hasThirdParty": hasThirdParty, + + // get the no. of columns to split the toc in search page + "tocColCount": tocColCount, } if p.URLForSrc != nil { p.funcMap["srcLink"] = p.URLForSrc diff --git a/godoc/search.go b/godoc/search.go index 870aefc018..0e7509ad8b 100644 --- a/godoc/search.go +++ b/godoc/search.go @@ -133,3 +133,54 @@ func (p *Presentation) serveSearchDesc(w http.ResponseWriter, r *http.Request) { } applyTemplateToResponseWriter(w, p.SearchDescXML, &data) } + +// tocColCount returns the no. of columns +// to split the toc table to. +func tocColCount(result SearchResult) int { + tocLen := tocLen(result) + colCount := 0 + // Simple heuristic based on visual aesthetic in manual testing. + switch { + case tocLen <= 10: + colCount = 1 + case tocLen <= 20: + colCount = 2 + case tocLen <= 80: + colCount = 3 + default: + colCount = 4 + } + return colCount +} + +// tocLen calculates the no. of items in the toc table +// by going through various fields in the SearchResult +// that is rendered in the UI. +func tocLen(result SearchResult) int { + tocLen := 0 + for _, val := range result.Idents { + if len(val) != 0 { + tocLen++ + } + } + // If no identifiers, then just one item for the header text "Package ". + // See searchcode.html for further details. + if len(result.Idents) == 0 { + tocLen++ + } + if result.Hit != nil { + if len(result.Hit.Decls) > 0 { + tocLen += len(result.Hit.Decls) + // We need one extra item for the header text "Package-level declarations". + tocLen++ + } + if len(result.Hit.Others) > 0 { + tocLen += len(result.Hit.Others) + // We need one extra item for the header text "Local declarations and uses". + tocLen++ + } + } + // For "textual occurrences". + tocLen++ + return tocLen +} diff --git a/godoc/static/godocs.js b/godoc/static/godocs.js index e7c16a1f1d..ca5bbea214 100644 --- a/godoc/static/godocs.js +++ b/godoc/static/godocs.js @@ -34,6 +34,13 @@ function generateTOC() { return; } + // For search, we send the toc precomputed from server-side. + // TODO: Ideally, this should always be precomputed for all pages, but then + // we need to do HTML parsing on the server-side. + if (location.pathname === '/search') { + return; + } + var nav = $('#nav'); if (nav.length === 0) { return; @@ -57,7 +64,6 @@ function generateTOC() { if (toc_items.length <= 1) { return; } - var dl1 = $('
'); var dl2 = $('
'); diff --git a/godoc/static/search.html b/godoc/static/search.html index e0d13b9b5e..3714e1d5e1 100644 --- a/godoc/static/search.html +++ b/godoc/static/search.html @@ -3,6 +3,54 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> + +{{ $colCount := tocColCount .}} +{{/* Generate the TOC */}} + + {{with .Alert}}

{{html .}} diff --git a/godoc/static/static.go b/godoc/static/static.go index 36b4e31f6e..46a2fd763d 100644 --- a/godoc/static/static.go +++ b/godoc/static/static.go @@ -53,7 +53,7 @@ var Files = map[string]string{ "godoc.html": "\x0a\x0a\x0a\x0a\x0a\x0a{{with\x20.Tabtitle}}\x0a\x20\x20{{html\x20.}}\x20-\x20The\x20Go\x20Programming\x20Language\x0a{{else}}\x0a\x20\x20The\x20Go\x20Programming\x20Language\x0a{{end}}\x0a\x0a{{if\x20.SearchBox}}\x0a\x0a{{end}}\x0a{{if\x20.TreeView}}\x0a\x0a{{end}}\x0a\x0a{{with\x20.GoogleAnalytics}}\x0a\x0avar\x20_gaq\x20=\x20_gaq\x20||\x20[];\x0a_gaq.push([\"_setAccount\",\x20\"{{.}}\"]);\x0awindow.trackPageview\x20=\x20function()\x20{\x0a\x20\x20_gaq.push([\"_trackPageview\",\x20location.pathname+location.hash]);\x0a};\x0awindow.trackPageview();\x0awindow.trackEvent\x20=\x20function(category,\x20action,\x20opt_label,\x20opt_value,\x20opt_noninteraction)\x20{\x0a\x20\x20_gaq.push([\"_trackEvent\",\x20category,\x20action,\x20opt_label,\x20opt_value,\x20opt_noninteraction]);\x0a};\x0a\x0a{{end}}\x0a\x0a{{if\x20.TreeView}}\x0a\x0a\x0a{{end}}\x0a\x0a{{if\x20.Playground}}\x0a\x0a{{end}}\x0a{{with\x20.Version}}{{end}}\x0a\x0a\x0a\x0a\x0a\x0a...\x0a\x0a\x0a\x0aThe\x20Go\x20Programming\x20Language\x0aGo\x0a▽\x0a\x0a\x0aDocuments\x0aPackages\x0aThe\x20Project\x0aHelp\x0a{{if\x20not\x20.GoogleCN}}\x0aBlog\x0a{{end}}\x0a{{if\x20(and\x20.Playground\x20.Title)}}\x0aPlay\x0a{{end}}\x0asubmit\x20search\x0a\x0a\x0a\x0a\x0a\x0a{{if\x20.Playground}}\x0a\x0a\x09package\x20main\x0a\x0aimport\x20\"fmt\"\x0a\x0afunc\x20main()\x20{\x0a\x09fmt.Println(\"Hello,\x20\xe4\xb8\x96\xe7\x95\x8c\")\x0a}\x0a\x09\x0a\x09\x0a\x09\x09Run\x0a\x09\x09Format\x0a\x09\x09{{if\x20not\x20$.GoogleCN}}\x0a\x09\x09Share\x0a\x09\x09{{end}}\x0a\x09\x0a\x0a{{end}}\x0a\x0a\x0a\x0a\x0a{{if\x20or\x20.Title\x20.SrcPath}}\x0a\x20\x20

\x0a\x20\x20\x20\x20{{html\x20.Title}}\x0a\x20\x20\x20\x20{{html\x20.SrcPath\x20|\x20srcBreadcrumb}}\x0a\x20\x20

\x0a{{end}}\x0a\x0a{{with\x20.Subtitle}}\x0a\x20\x20

{{html\x20.}}

\x0a{{end}}\x0a\x0a{{with\x20.SrcPath}}\x0a\x20\x20

\x0a\x20\x20\x20\x20Documentation:\x20{{html\x20.\x20|\x20srcToPkgLink}}\x0a\x20\x20

\x0a{{end}}\x0a\x0a{{/*\x20The\x20Table\x20of\x20Contents\x20is\x20automatically\x20inserted\x20in\x20this\x20
.\x0a\x20\x20\x20\x20\x20Do\x20not\x20delete\x20this\x20
.\x20*/}}\x0a
\x0a\x0a{{/*\x20Body\x20is\x20HTML-escaped\x20elsewhere\x20*/}}\x0a{{printf\x20\"%s\"\x20.Body}}\x0a\x0a\x0aBuild\x20version\x20{{html\x20.Version}}.
\x0aExcept\x20as\x20noted,\x0athe\x20content\x20of\x20this\x20page\x20is\x20licensed\x20under\x20the\x0aCreative\x20Commons\x20Attribution\x203.0\x20License,\x0aand\x20code\x20is\x20licensed\x20under\x20a\x20BSD\x20license.
\x0aTerms\x20of\x20Service\x20|\x0aPrivacy\x20Policy\x0a
\x0a\x0a\x0a\x0a{{if\x20.GoogleAnalytics}}\x0a\x0a(function()\x20{\x0a\x20\x20var\x20ga\x20=\x20document.createElement(\"script\");\x20ga.type\x20=\x20\"text/javascript\";\x20ga.async\x20=\x20true;\x0a\x20\x20ga.src\x20=\x20(\"https:\"\x20==\x20document.location.protocol\x20?\x20\"https://ssl\"\x20:\x20\"http://www\")\x20+\x20\".google-analytics.com/ga.js\";\x0a\x20\x20var\x20s\x20=\x20document.getElementsByTagName(\"script\")[0];\x20s.parentNode.insertBefore(ga,\x20s);\x0a})();\x0a\x0a{{end}}\x0a\x0a\x0a\x0a", - "godocs.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0a/*\x20A\x20little\x20code\x20to\x20ease\x20navigation\x20of\x20these\x20documents.\x0a\x20*\x0a\x20*\x20On\x20window\x20load\x20we:\x0a\x20*\x20\x20+\x20Generate\x20a\x20table\x20of\x20contents\x20(generateTOC)\x0a\x20*\x20\x20+\x20Bind\x20foldable\x20sections\x20(bindToggles)\x0a\x20*\x20\x20+\x20Bind\x20links\x20to\x20foldable\x20sections\x20(bindToggleLinks)\x0a\x20*/\x0a\x0a(function()\x20{\x0a'use\x20strict';\x0a\x0a//\x20Mobile-friendly\x20topbar\x20menu\x0a$(function()\x20{\x0a\x20\x20var\x20menu\x20=\x20$('#menu');\x0a\x20\x20var\x20menuButton\x20=\x20$('#menu-button');\x0a\x20\x20var\x20menuButtonArrow\x20=\x20$('#menu-button-arrow');\x0a\x20\x20menuButton.click(function(event)\x20{\x0a\x20\x20\x20\x20menu.toggleClass('menu-visible');\x0a\x20\x20\x20\x20menuButtonArrow.toggleClass('vertical-flip');\x0a\x20\x20\x20\x20event.preventDefault();\x0a\x20\x20\x20\x20return\x20false;\x0a\x20\x20});\x0a});\x0a\x0a/*\x20Generates\x20a\x20table\x20of\x20contents:\x20looks\x20for\x20h2\x20and\x20h3\x20elements\x20and\x20generates\x0a\x20*\x20links.\x20\"Decorates\"\x20the\x20element\x20with\x20id==\"nav\"\x20with\x20this\x20table\x20of\x20contents.\x0a\x20*/\x0afunction\x20generateTOC()\x20{\x0a\x20\x20if\x20($('#manual-nav').length\x20>\x200)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20nav\x20=\x20$('#nav');\x0a\x20\x20if\x20(nav.length\x20===\x200)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20toc_items\x20=\x20[];\x0a\x20\x20$(nav).nextAll('h2,\x20h3').each(function()\x20{\x0a\x20\x20\x20\x20var\x20node\x20=\x20this;\x0a\x20\x20\x20\x20if\x20(node.id\x20==\x20'')\x0a\x20\x20\x20\x20\x20\x20node.id\x20=\x20'tmp_'\x20+\x20toc_items.length;\x0a\x20\x20\x20\x20var\x20link\x20=\x20$('').attr('href',\x20'#'\x20+\x20node.id).text($(node).text());\x0a\x20\x20\x20\x20var\x20item;\x0a\x20\x20\x20\x20if\x20($(node).is('h2'))\x20{\x0a\x20\x20\x20\x20\x20\x20item\x20=\x20$('
');\x0a\x20\x20\x20\x20}\x20else\x20{\x20//\x20h3\x0a\x20\x20\x20\x20\x20\x20item\x20=\x20$('');\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20item.append(link);\x0a\x20\x20\x20\x20toc_items.push(item);\x0a\x20\x20});\x0a\x20\x20if\x20(toc_items.length\x20<=\x201)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20dl1\x20=\x20$('
');\x0a\x20\x20var\x20dl2\x20=\x20$('
');\x0a\x0a\x20\x20var\x20split_index\x20=\x20(toc_items.length\x20/\x202)\x20+\x201;\x0a\x20\x20if\x20(split_index\x20<\x208)\x20{\x0a\x20\x20\x20\x20split_index\x20=\x20toc_items.length;\x0a\x20\x20}\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20split_index;\x20i++)\x20{\x0a\x20\x20\x20\x20dl1.append(toc_items[i]);\x0a\x20\x20}\x0a\x20\x20for\x20(/*\x20keep\x20using\x20i\x20*/;\x20i\x20<\x20toc_items.length;\x20i++)\x20{\x0a\x20\x20\x20\x20dl2.append(toc_items[i]);\x0a\x20\x20}\x0a\x0a\x20\x20var\x20tocTable\x20=\x20$('').appendTo(nav);\x0a\x20\x20var\x20tocBody\x20=\x20$('').appendTo(tocTable);\x0a\x20\x20var\x20tocRow\x20=\x20$('').appendTo(tocBody);\x0a\x0a\x20\x20//\x201st\x20column\x0a\x20\x20$('').appendTo(tocRow).append(dl1);\x0a\x20\x20//\x202nd\x20column\x0a\x20\x20$('').appendTo(tocRow).append(dl2);\x0a}\x0a\x0afunction\x20bindToggle(el)\x20{\x0a\x20\x20$('.toggleButton',\x20el).click(function()\x20{\x0a\x20\x20\x20\x20if\x20($(this).closest(\".toggle,\x20.toggleVisible\")[0]\x20!=\x20el)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Only\x20trigger\x20the\x20closest\x20toggle\x20header.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20($(el).is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20$(el).addClass('toggleVisible').removeClass('toggle');\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20$(el).addClass('toggle').removeClass('toggleVisible');\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0a\x0afunction\x20bindToggles(selector)\x20{\x0a\x20\x20$(selector).each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20bindToggle(el);\x0a\x20\x20});\x0a}\x0a\x0afunction\x20bindToggleLink(el,\x20prefix)\x20{\x0a\x20\x20$(el).click(function()\x20{\x0a\x20\x20\x20\x20var\x20href\x20=\x20$(el).attr('href');\x0a\x20\x20\x20\x20var\x20i\x20=\x20href.indexOf('#'+prefix);\x0a\x20\x20\x20\x20if\x20(i\x20<\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20id\x20=\x20'#'\x20+\x20prefix\x20+\x20href.slice(i+1+prefix.length);\x0a\x20\x20\x20\x20if\x20($(id).is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20$(id).find('.toggleButton').first().click();\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0afunction\x20bindToggleLinks(selector,\x20prefix)\x20{\x0a\x20\x20$(selector).each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20bindToggleLink(el,\x20prefix);\x0a\x20\x20});\x0a}\x0a\x0afunction\x20setupDropdownPlayground()\x20{\x0a\x20\x20if\x20(!$('#page').is('.wide'))\x20{\x0a\x20\x20\x20\x20return;\x20//\x20don't\x20show\x20on\x20front\x20page\x0a\x20\x20}\x0a\x20\x20var\x20button\x20=\x20$('#playgroundButton');\x0a\x20\x20var\x20div\x20=\x20$('#playground');\x0a\x20\x20var\x20setup\x20=\x20false;\x0a\x20\x20button.toggle(function()\x20{\x0a\x20\x20\x20\x20button.addClass('active');\x0a\x20\x20\x20\x20div.show();\x0a\x20\x20\x20\x20if\x20(setup)\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20setup\x20=\x20true;\x0a\x20\x20\x20\x20playground({\x0a\x20\x20\x20\x20\x20\x20'codeEl':\x20$('.code',\x20div),\x0a\x20\x20\x20\x20\x20\x20'outputEl':\x20$('.output',\x20div),\x0a\x20\x20\x20\x20\x20\x20'runEl':\x20$('.run',\x20div),\x0a\x20\x20\x20\x20\x20\x20'fmtEl':\x20$('.fmt',\x20div),\x0a\x20\x20\x20\x20\x20\x20'shareEl':\x20$('.share',\x20div),\x0a\x20\x20\x20\x20\x20\x20'shareRedirect':\x20'//play.golang.org/p/'\x0a\x20\x20\x20\x20});\x0a\x20\x20},\x0a\x20\x20function()\x20{\x0a\x20\x20\x20\x20button.removeClass('active');\x0a\x20\x20\x20\x20div.hide();\x0a\x20\x20});\x0a\x20\x20$('#menu').css('min-width',\x20'+=60');\x0a\x0a\x20\x20//\x20Hide\x20inline\x20playground\x20if\x20we\x20click\x20somewhere\x20on\x20the\x20page.\x0a\x20\x20//\x20This\x20is\x20needed\x20in\x20mobile\x20devices,\x20where\x20the\x20\"Play\"\x20button\x0a\x20\x20//\x20is\x20not\x20clickable\x20once\x20the\x20playground\x20opens\x20up.\x0a\x20\x20$(\"#page\").click(function()\x20{\x0a\x20\x20\x20\x20if\x20(button.hasClass('active'))\x20{\x0a\x20\x20\x20\x20\x20\x20button.click();\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0a\x0afunction\x20setupInlinePlayground()\x20{\x0a\x09'use\x20strict';\x0a\x09//\x20Set\x20up\x20playground\x20when\x20each\x20element\x20is\x20toggled.\x0a\x09$('div.play').each(function\x20(i,\x20el)\x20{\x0a\x09\x09//\x20Set\x20up\x20playground\x20for\x20this\x20example.\x0a\x09\x09var\x20setup\x20=\x20function()\x20{\x0a\x09\x09\x09var\x20code\x20=\x20$('.code',\x20el);\x0a\x09\x09\x09playground({\x0a\x09\x09\x09\x09'codeEl':\x20\x20\x20code,\x0a\x09\x09\x09\x09'outputEl':\x20$('.output',\x20el),\x0a\x09\x09\x09\x09'runEl':\x20\x20\x20\x20$('.run',\x20el),\x0a\x09\x09\x09\x09'fmtEl':\x20\x20\x20\x20$('.fmt',\x20el),\x0a\x09\x09\x09\x09'shareEl':\x20\x20$('.share',\x20el),\x0a\x09\x09\x09\x09'shareRedirect':\x20'//play.golang.org/p/'\x0a\x09\x09\x09});\x0a\x0a\x09\x09\x09//\x20Make\x20the\x20code\x20textarea\x20resize\x20to\x20fit\x20content.\x0a\x09\x09\x09var\x20resize\x20=\x20function()\x20{\x0a\x09\x09\x09\x09code.height(0);\x0a\x09\x09\x09\x09var\x20h\x20=\x20code[0].scrollHeight;\x0a\x09\x09\x09\x09code.height(h+20);\x20//\x20minimize\x20bouncing.\x0a\x09\x09\x09\x09code.closest('.input').height(h);\x0a\x09\x09\x09};\x0a\x09\x09\x09code.on('keydown',\x20resize);\x0a\x09\x09\x09code.on('keyup',\x20resize);\x0a\x09\x09\x09code.keyup();\x20//\x20resize\x20now.\x0a\x09\x09};\x0a\x0a\x09\x09//\x20If\x20example\x20already\x20visible,\x20set\x20up\x20playground\x20now.\x0a\x09\x09if\x20($(el).is(':visible'))\x20{\x0a\x09\x09\x09setup();\x0a\x09\x09\x09return;\x0a\x09\x09}\x0a\x0a\x09\x09//\x20Otherwise,\x20set\x20up\x20playground\x20when\x20example\x20is\x20expanded.\x0a\x09\x09var\x20built\x20=\x20false;\x0a\x09\x09$(el).closest('.toggle').click(function()\x20{\x0a\x09\x09\x09//\x20Only\x20set\x20up\x20once.\x0a\x09\x09\x09if\x20(!built)\x20{\x0a\x09\x09\x09\x09setup();\x0a\x09\x09\x09\x09built\x20=\x20true;\x0a\x09\x09\x09}\x0a\x09\x09});\x0a\x09});\x0a}\x0a\x0a//\x20fixFocus\x20tries\x20to\x20put\x20focus\x20to\x20div#page\x20so\x20that\x20keyboard\x20navigation\x20works.\x0afunction\x20fixFocus()\x20{\x0a\x20\x20var\x20page\x20=\x20$('div#page');\x0a\x20\x20var\x20topbar\x20=\x20$('div#topbar');\x0a\x20\x20page.css('outline',\x200);\x20//\x20disable\x20outline\x20when\x20focused\x0a\x20\x20page.attr('tabindex',\x20-1);\x20//\x20and\x20set\x20tabindex\x20so\x20that\x20it\x20is\x20focusable\x0a\x20\x20$(window).resize(function\x20(evt)\x20{\x0a\x20\x20\x20\x20//\x20only\x20focus\x20page\x20when\x20the\x20topbar\x20is\x20at\x20fixed\x20position\x20(that\x20is,\x20it's\x20in\x0a\x20\x20\x20\x20//\x20front\x20of\x20page,\x20and\x20keyboard\x20event\x20will\x20go\x20to\x20the\x20former\x20by\x20default.)\x0a\x20\x20\x20\x20//\x20by\x20focusing\x20page,\x20keyboard\x20event\x20will\x20go\x20to\x20page\x20so\x20that\x20up/down\x20arrow,\x0a\x20\x20\x20\x20//\x20space,\x20etc.\x20will\x20work\x20as\x20expected.\x0a\x20\x20\x20\x20if\x20(topbar.css('position')\x20==\x20\"fixed\")\x0a\x20\x20\x20\x20\x20\x20page.focus();\x0a\x20\x20}).resize();\x0a}\x0a\x0afunction\x20toggleHash()\x20{\x0a\x20\x20var\x20id\x20=\x20window.location.hash.substring(1);\x0a\x20\x20//\x20Open\x20all\x20of\x20the\x20toggles\x20for\x20a\x20particular\x20hash.\x0a\x20\x20var\x20els\x20=\x20$(\x0a\x20\x20\x20\x20document.getElementById(id),\x0a\x20\x20\x20\x20$('a[name]').filter(function()\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20$(this).attr('name')\x20==\x20id;\x0a\x20\x20\x20\x20})\x0a\x20\x20);\x0a\x0a\x20\x20while\x20(els.length)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20els.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20el\x20=\x20$(els[i]);\x0a\x20\x20\x20\x20\x20\x20if\x20(el.is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.find('.toggleButton').first().click();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20els\x20=\x20el.parent();\x0a\x20\x20}\x0a}\x0a\x0afunction\x20personalizeInstallInstructions()\x20{\x0a\x20\x20var\x20prefix\x20=\x20'?download=';\x0a\x20\x20var\x20s\x20=\x20window.location.search;\x0a\x20\x20if\x20(s.indexOf(prefix)\x20!=\x200)\x20{\x0a\x20\x20\x20\x20//\x20No\x20'download'\x20query\x20string;\x20detect\x20\"test\"\x20instructions\x20from\x20User\x20Agent.\x0a\x20\x20\x20\x20if\x20(navigator.platform.indexOf('Win')\x20!=\x20-1)\x20{\x0a\x20\x20\x20\x20\x20\x20$('.testUnix').hide();\x0a\x20\x20\x20\x20\x20\x20$('.testWindows').show();\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20$('.testUnix').show();\x0a\x20\x20\x20\x20\x20\x20$('.testWindows').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20filename\x20=\x20s.substr(prefix.length);\x0a\x20\x20var\x20filenameRE\x20=\x20/^go1\\.\\d+(\\.\\d+)?([a-z0-9]+)?\\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\\.[68])?\\.([a-z.]+)$/;\x0a\x20\x20var\x20m\x20=\x20filenameRE.exec(filename);\x0a\x20\x20if\x20(!m)\x20{\x0a\x20\x20\x20\x20//\x20Can't\x20interpret\x20file\x20name;\x20bail.\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x20\x20$('.downloadFilename').text(filename);\x0a\x20\x20$('.hideFromDownload').hide();\x0a\x0a\x20\x20var\x20os\x20=\x20m[3];\x0a\x20\x20var\x20ext\x20=\x20m[6];\x0a\x20\x20if\x20(ext\x20!=\x20'tar.gz')\x20{\x0a\x20\x20\x20\x20$('#tarballInstructions').hide();\x0a\x20\x20}\x0a\x20\x20if\x20(os\x20!=\x20'darwin'\x20||\x20ext\x20!=\x20'pkg')\x20{\x0a\x20\x20\x20\x20$('#darwinPackageInstructions').hide();\x0a\x20\x20}\x0a\x20\x20if\x20(os\x20!=\x20'windows')\x20{\x0a\x20\x20\x20\x20$('#windowsInstructions').hide();\x0a\x20\x20\x20\x20$('.testUnix').show();\x0a\x20\x20\x20\x20$('.testWindows').hide();\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20if\x20(ext\x20!=\x20'msi')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#windowsInstallerInstructions').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(ext\x20!=\x20'zip')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#windowsZipInstructions').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20$('.testUnix').hide();\x0a\x20\x20\x20\x20$('.testWindows').show();\x0a\x20\x20}\x0a\x0a\x20\x20var\x20download\x20=\x20\"https://dl.google.com/go/\"\x20+\x20filename;\x0a\x0a\x20\x20var\x20message\x20=\x20$(''+\x0a\x20\x20\x20\x20'Your\x20download\x20should\x20begin\x20shortly.\x20'+\x0a\x20\x20\x20\x20'If\x20it\x20does\x20not,\x20click\x20this\x20link.

');\x0a\x20\x20message.find('a').attr('href',\x20download);\x0a\x20\x20message.insertAfter('#nav');\x0a\x0a\x20\x20window.location\x20=\x20download;\x0a}\x0a\x0afunction\x20updateVersionTags()\x20{\x0a\x20\x20var\x20v\x20=\x20window.goVersion;\x0a\x20\x20if\x20(/^go[0-9.]+$/.test(v))\x20{\x0a\x20\x20\x20\x20$(\".versionTag\").empty().text(v);\x0a\x20\x20\x20\x20$(\".whereTag\").hide();\x0a\x20\x20}\x0a}\x0a\x0afunction\x20addPermalinks()\x20{\x0a\x20\x20function\x20addPermalink(source,\x20parent)\x20{\x0a\x20\x20\x20\x20var\x20id\x20=\x20source.attr(\"id\");\x0a\x20\x20\x20\x20if\x20(id\x20==\x20\"\"\x20||\x20id.indexOf(\"tmp_\")\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Auto-generated\x20permalink.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(parent.find(\">\x20.permalink\").length)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Already\x20attached.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20parent.append(\"\x20\").append($(\"¶\").attr(\"href\",\x20\"#\"\x20+\x20id));\x0a\x20\x20}\x0a\x0a\x20\x20$(\"#page\x20.container\").find(\"h2[id],\x20h3[id]\").each(function()\x20{\x0a\x20\x20\x20\x20var\x20el\x20=\x20$(this);\x0a\x20\x20\x20\x20addPermalink(el,\x20el);\x0a\x20\x20});\x0a\x0a\x20\x20$(\"#page\x20.container\").find(\"dl[id]\").each(function()\x20{\x0a\x20\x20\x20\x20var\x20el\x20=\x20$(this);\x0a\x20\x20\x20\x20//\x20Add\x20the\x20anchor\x20to\x20the\x20\"dt\"\x20element.\x0a\x20\x20\x20\x20addPermalink(el,\x20el.find(\">\x20dt\").first());\x0a\x20\x20});\x0a}\x0a\x0a$(\".js-expandAll\").click(function()\x20{\x0a\x20\x20if\x20($(this).hasClass(\"collapsed\"))\x20{\x0a\x20\x20\x20\x20toggleExamples('toggle');\x0a\x20\x20\x20\x20$(this).text(\"(Collapse\x20All)\");\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20toggleExamples('toggleVisible');\x0a\x20\x20\x20\x20$(this).text(\"(Expand\x20All)\");\x0a\x20\x20}\x0a\x20\x20$(this).toggleClass(\"collapsed\")\x0a});\x0a\x0afunction\x20toggleExamples(className)\x20{\x0a\x20\x20//\x20We\x20need\x20to\x20explicitly\x20iterate\x20through\x20divs\x20starting\x20with\x20\"example_\"\x0a\x20\x20//\x20to\x20avoid\x20toggling\x20Overview\x20and\x20Index\x20collapsibles.\x0a\x20\x20$(\"[id^='example_']\").each(function()\x20{\x0a\x20\x20\x20\x20//\x20Check\x20for\x20state\x20and\x20click\x20it\x20only\x20if\x20required.\x0a\x20\x20\x20\x20if\x20($(this).hasClass(className))\x20{\x0a\x20\x20\x20\x20\x20\x20$(this).find('.toggleButton').first().click();\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0a\x0a$(document).ready(function()\x20{\x0a\x20\x20generateTOC();\x0a\x20\x20addPermalinks();\x0a\x20\x20bindToggles(\".toggle\");\x0a\x20\x20bindToggles(\".toggleVisible\");\x0a\x20\x20bindToggleLinks(\".exampleLink\",\x20\"example_\");\x0a\x20\x20bindToggleLinks(\".overviewLink\",\x20\"\");\x0a\x20\x20bindToggleLinks(\".examplesLink\",\x20\"\");\x0a\x20\x20bindToggleLinks(\".indexLink\",\x20\"\");\x0a\x20\x20setupDropdownPlayground();\x0a\x20\x20setupInlinePlayground();\x0a\x20\x20fixFocus();\x0a\x20\x20setupTypeInfo();\x0a\x20\x20setupCallgraphs();\x0a\x20\x20toggleHash();\x0a\x20\x20personalizeInstallInstructions();\x0a\x20\x20updateVersionTags();\x0a\x0a\x20\x20//\x20godoc.html\x20defines\x20window.initFuncs\x20in\x20the\x20\x20tag,\x20and\x20root.html\x20and\x0a\x20\x20//\x20codewalk.js\x20push\x20their\x20on-page-ready\x20functions\x20to\x20the\x20list.\x0a\x20\x20//\x20We\x20execute\x20those\x20functions\x20here,\x20to\x20avoid\x20loading\x20jQuery\x20until\x20the\x20page\x0a\x20\x20//\x20content\x20is\x20loaded.\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20window.initFuncs.length;\x20i++)\x20window.initFuncs[i]();\x0a});\x0a\x0a//\x20--\x20analysis\x20---------------------------------------------------------\x0a\x0a//\x20escapeHTML\x20returns\x20HTML\x20for\x20s,\x20with\x20metacharacters\x20quoted.\x0a//\x20It\x20is\x20safe\x20for\x20use\x20in\x20both\x20elements\x20and\x20attributes\x0a//\x20(unlike\x20the\x20\"set\x20innerText,\x20read\x20innerHTML\"\x20trick).\x0afunction\x20escapeHTML(s)\x20{\x0a\x20\x20\x20\x20return\x20s.replace(/&/g,\x20'&').\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20replace(/\\\"/g,\x20'"').\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20replace(/\\'/g,\x20''').\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20replace(//g,\x20'>');\x0a}\x0a\x0a//\x20makeAnchor\x20returns\x20HTML\x20for\x20an\x20\x20element,\x20given\x20an\x20anchorJSON\x20object.\x0afunction\x20makeAnchor(json)\x20{\x0a\x20\x20var\x20html\x20=\x20escapeHTML(json.Text);\x0a\x20\x20if\x20(json.Href\x20!=\x20\"\")\x20{\x0a\x20\x20\x20\x20\x20\x20html\x20=\x20\"\"\x20+\x20html\x20+\x20\"\";\x0a\x20\x20}\x0a\x20\x20return\x20html;\x0a}\x0a\x0afunction\x20showLowFrame(html)\x20{\x0a\x20\x20var\x20lowframe\x20=\x20document.getElementById('lowframe');\x0a\x20\x20lowframe.style.height\x20=\x20\"200px\";\x0a\x20\x20lowframe.innerHTML\x20=\x20\"\"\x20+\x20html\x20+\x20\"

\\n\"\x20+\x0a\x20\x20\x20\x20\x20\x20\"\xe2\x9c\x98\"\x0a};\x0a\x0adocument.hideLowFrame\x20=\x20function()\x20{\x0a\x20\x20var\x20lowframe\x20=\x20document.getElementById('lowframe');\x0a\x20\x20lowframe.style.height\x20=\x20\"0px\";\x0a}\x0a\x0a//\x20onClickCallers\x20is\x20the\x20onclick\x20action\x20for\x20the\x20'func'\x20tokens\x20of\x20a\x0a//\x20function\x20declaration.\x0adocument.onClickCallers\x20=\x20function(index)\x20{\x0a\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[index]\x0a\x20\x20if\x20(data.Callers.length\x20==\x201\x20&&\x20data.Callers[0].Sites.length\x20==\x201)\x20{\x0a\x20\x20\x20\x20document.location\x20=\x20data.Callers[0].Sites[0].Href;\x20//\x20jump\x20to\x20sole\x20caller\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20html\x20=\x20\"Callers\x20of\x20\"\x20+\x20escapeHTML(data.Callee)\x20+\x20\":
\\n\";\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20data.Callers.length;\x20i++)\x20{\x0a\x20\x20\x20\x20var\x20caller\x20=\x20data.Callers[i];\x0a\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20escapeHTML(caller.Func)\x20+\x20\"\";\x0a\x20\x20\x20\x20var\x20sites\x20=\x20caller.Sites;\x0a\x20\x20\x20\x20if\x20(sites\x20!=\x20null\x20&&\x20sites.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20html\x20+=\x20\"\x20at\x20line\x20\";\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20j\x20=\x200;\x20j\x20<\x20sites.length;\x20j++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(j\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20\",\x20\";\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20makeAnchor(sites[j])\x20+\x20\"\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20html\x20+=\x20\"
\\n\";\x0a\x20\x20}\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a//\x20onClickCallees\x20is\x20the\x20onclick\x20action\x20for\x20the\x20'('\x20token\x20of\x20a\x20function\x20call.\x0adocument.onClickCallees\x20=\x20function(index)\x20{\x0a\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[index]\x0a\x20\x20if\x20(data.Callees.length\x20==\x201)\x20{\x0a\x20\x20\x20\x20document.location\x20=\x20data.Callees[0].Href;\x20//\x20jump\x20to\x20sole\x20callee\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20html\x20=\x20\"Callees\x20of\x20this\x20\"\x20+\x20escapeHTML(data.Descr)\x20+\x20\":
\\n\";\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20data.Callees.length;\x20i++)\x20{\x0a\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20makeAnchor(data.Callees[i])\x20+\x20\"
\\n\";\x0a\x20\x20}\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a//\x20onClickTypeInfo\x20is\x20the\x20onclick\x20action\x20for\x20identifiers\x20declaring\x20a\x20named\x20type.\x0adocument.onClickTypeInfo\x20=\x20function(index)\x20{\x0a\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[index];\x0a\x20\x20var\x20html\x20=\x20\"Type\x20\"\x20+\x20data.Name\x20+\x20\":\x20\"\x20+\x0a\x20\x20\"      (size=\"\x20+\x20data.Size\x20+\x20\",\x20align=\"\x20+\x20data.Align\x20+\x20\")
\\n\";\x0a\x20\x20html\x20+=\x20implementsHTML(data);\x0a\x20\x20html\x20+=\x20methodsetHTML(data);\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a//\x20implementsHTML\x20returns\x20HTML\x20for\x20the\x20implements\x20relation\x20of\x20the\x0a//\x20specified\x20TypeInfoJSON\x20value.\x0afunction\x20implementsHTML(info)\x20{\x0a\x20\x20var\x20html\x20=\x20\"\";\x0a\x20\x20if\x20(info.ImplGroups\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20info.ImplGroups.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20group\x20=\x20info.ImplGroups[i];\x0a\x20\x20\x20\x20\x20\x20var\x20x\x20=\x20\"\"\x20+\x20escapeHTML(group.Descr)\x20+\x20\"\x20\";\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20j\x20=\x200;\x20j\x20<\x20group.Facts.length;\x20j++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20fact\x20=\x20group.Facts[j];\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20y\x20=\x20\"\"\x20+\x20makeAnchor(fact.Other)\x20+\x20\"\";\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fact.ByKind\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20escapeHTML(fact.ByKind)\x20+\x20\"\x20type\x20\"\x20+\x20y\x20+\x20\"\x20implements\x20\"\x20+\x20x;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20x\x20+\x20\"\x20implements\x20\"\x20+\x20y;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20\"
\\n\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20return\x20html;\x0a}\x0a\x0a\x0a//\x20methodsetHTML\x20returns\x20HTML\x20for\x20the\x20methodset\x20of\x20the\x20specified\x0a//\x20TypeInfoJSON\x20value.\x0afunction\x20methodsetHTML(info)\x20{\x0a\x20\x20var\x20html\x20=\x20\"\";\x0a\x20\x20if\x20(info.Methods\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20info.Methods.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20makeAnchor(info.Methods[i])\x20+\x20\"
\\n\";\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20return\x20html;\x0a}\x0a\x0a//\x20onClickComm\x20is\x20the\x20onclick\x20action\x20for\x20channel\x20\"make\"\x20and\x20\"<-\"\x0a//\x20send/receive\x20tokens.\x0adocument.onClickComm\x20=\x20function(index)\x20{\x0a\x20\x20var\x20ops\x20=\x20document.ANALYSIS_DATA[index].Ops\x0a\x20\x20if\x20(ops.length\x20==\x201)\x20{\x0a\x20\x20\x20\x20document.location\x20=\x20ops[0].Op.Href;\x20//\x20jump\x20to\x20sole\x20element\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20html\x20=\x20\"Operations\x20on\x20this\x20channel:
\\n\";\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20ops.length;\x20i++)\x20{\x0a\x20\x20\x20\x20html\x20+=\x20makeAnchor(ops[i].Op)\x20+\x20\"\x20by\x20\"\x20+\x20escapeHTML(ops[i].Fn)\x20+\x20\"
\\n\";\x0a\x20\x20}\x0a\x20\x20if\x20(ops.length\x20==\x200)\x20{\x0a\x20\x20\x20\x20html\x20+=\x20\"(none)
\\n\";\x0a\x20\x20}\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a$(window).load(function()\x20{\x0a\x20\x20\x20\x20//\x20Scroll\x20window\x20so\x20that\x20first\x20selection\x20is\x20visible.\x0a\x20\x20\x20\x20//\x20(This\x20means\x20we\x20don't\x20need\x20to\x20emit\x20id='L%d'\x20spans\x20for\x20each\x20line.)\x0a\x20\x20\x20\x20//\x20TODO(adonovan):\x20ideally,\x20scroll\x20it\x20so\x20that\x20it's\x20under\x20the\x20pointer,\x0a\x20\x20\x20\x20//\x20but\x20I\x20don't\x20know\x20how\x20to\x20get\x20the\x20pointer\x20y\x20coordinate.\x0a\x20\x20\x20\x20var\x20elts\x20=\x20document.getElementsByClassName(\"selection\");\x0a\x20\x20\x20\x20if\x20(elts.length\x20>\x200)\x20{\x0a\x09elts[0].scrollIntoView()\x0a\x20\x20\x20\x20}\x0a});\x0a\x0a//\x20setupTypeInfo\x20populates\x20the\x20\"Implements\"\x20and\x20\"Method\x20set\"\x20toggle\x20for\x0a//\x20each\x20type\x20in\x20the\x20package\x20doc.\x0afunction\x20setupTypeInfo()\x20{\x0a\x20\x20for\x20(var\x20i\x20in\x20document.ANALYSIS_DATA)\x20{\x0a\x20\x20\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[i];\x0a\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\"implements-\"\x20+\x20i);\x0a\x20\x20\x20\x20if\x20(el\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20el\x20!=\x20null\x20=>\x20data\x20is\x20TypeInfoJSON.\x0a\x20\x20\x20\x20\x20\x20if\x20(data.ImplGroups\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.innerHTML\x20=\x20implementsHTML(data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.parentNode.parentNode.style.display\x20=\x20\"block\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\"methodset-\"\x20+\x20i);\x0a\x20\x20\x20\x20if\x20(el\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20el\x20!=\x20null\x20=>\x20data\x20is\x20TypeInfoJSON.\x0a\x20\x20\x20\x20\x20\x20if\x20(data.Methods\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.innerHTML\x20=\x20methodsetHTML(data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.parentNode.parentNode.style.display\x20=\x20\"block\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a}\x0a\x0afunction\x20setupCallgraphs()\x20{\x0a\x20\x20if\x20(document.CALLGRAPH\x20==\x20null)\x20{\x0a\x20\x20\x20\x20return\x0a\x20\x20}\x0a\x20\x20document.getElementById(\"pkg-callgraph\").style.display\x20=\x20\"block\";\x0a\x0a\x20\x20var\x20treeviews\x20=\x20document.getElementsByClassName(\"treeview\");\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20treeviews.length;\x20i++)\x20{\x0a\x20\x20\x20\x20var\x20tree\x20=\x20treeviews[i];\x0a\x20\x20\x20\x20if\x20(tree.id\x20==\x20null\x20||\x20tree.id.indexOf(\"callgraph-\")\x20!=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20continue;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20id\x20=\x20tree.id.substring(\"callgraph-\".length);\x0a\x20\x20\x20\x20$(tree).treeview({collapsed:\x20true,\x20animated:\x20\"fast\"});\x0a\x20\x20\x20\x20document.cgAddChildren(tree,\x20tree,\x20[id]);\x0a\x20\x20\x20\x20tree.parentNode.parentNode.style.display\x20=\x20\"block\";\x0a\x20\x20}\x0a}\x0a\x0adocument.cgAddChildren\x20=\x20function(tree,\x20ul,\x20indices)\x20{\x0a\x20\x20if\x20(indices\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20indices.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20li\x20=\x20cgAddChild(tree,\x20ul,\x20document.CALLGRAPH[indices[i]]);\x0a\x20\x20\x20\x20\x20\x20if\x20(i\x20==\x20indices.length\x20-\x201)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$(li).addClass(\"last\");\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20$(tree).treeview({animated:\x20\"fast\",\x20add:\x20ul});\x0a}\x0a\x0a//\x20cgAddChild\x20adds\x20an\x20
  • \x20element\x20for\x20document.CALLGRAPH\x20node\x20cgn\x20to\x0a//\x20the\x20parent\x20
      \x20element\x20ul.\x20tree\x20is\x20the\x20tree's\x20root\x20
        \x20element.\x0afunction\x20cgAddChild(tree,\x20ul,\x20cgn)\x20{\x0a\x20\x20\x20var\x20li\x20=\x20document.createElement(\"li\");\x0a\x20\x20\x20ul.appendChild(li);\x0a\x20\x20\x20li.className\x20=\x20\"closed\";\x0a\x0a\x20\x20\x20var\x20code\x20=\x20document.createElement(\"code\");\x0a\x0a\x20\x20\x20if\x20(cgn.Callees\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20$(li).addClass(\"expandable\");\x0a\x0a\x20\x20\x20\x20\x20//\x20Event\x20handlers\x20and\x20innerHTML\x20updates\x20don't\x20play\x20nicely\x20together,\x0a\x20\x20\x20\x20\x20//\x20hence\x20all\x20this\x20explicit\x20DOM\x20manipulation.\x0a\x20\x20\x20\x20\x20var\x20hitarea\x20=\x20document.createElement(\"div\");\x0a\x20\x20\x20\x20\x20hitarea.className\x20=\x20\"hitarea\x20expandable-hitarea\";\x0a\x20\x20\x20\x20\x20li.appendChild(hitarea);\x0a\x0a\x20\x20\x20\x20\x20li.appendChild(code);\x0a\x0a\x20\x20\x20\x20\x20var\x20childUL\x20=\x20document.createElement(\"ul\");\x0a\x20\x20\x20\x20\x20li.appendChild(childUL);\x0a\x20\x20\x20\x20\x20childUL.setAttribute('style',\x20\"display:\x20none;\");\x0a\x0a\x20\x20\x20\x20\x20var\x20onClick\x20=\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20document.cgAddChildren(tree,\x20childUL,\x20cgn.Callees);\x0a\x20\x20\x20\x20\x20\x20\x20hitarea.removeEventListener('click',\x20onClick)\x0a\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20hitarea.addEventListener('click',\x20onClick);\x0a\x0a\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20li.appendChild(code);\x0a\x20\x20\x20}\x0a\x20\x20\x20code.innerHTML\x20+=\x20\" \"\x20+\x20makeAnchor(cgn.Func);\x0a\x20\x20\x20return\x20li\x0a}\x0a\x0a})();\x0a", + "godocs.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0a/*\x20A\x20little\x20code\x20to\x20ease\x20navigation\x20of\x20these\x20documents.\x0a\x20*\x0a\x20*\x20On\x20window\x20load\x20we:\x0a\x20*\x20\x20+\x20Generate\x20a\x20table\x20of\x20contents\x20(generateTOC)\x0a\x20*\x20\x20+\x20Bind\x20foldable\x20sections\x20(bindToggles)\x0a\x20*\x20\x20+\x20Bind\x20links\x20to\x20foldable\x20sections\x20(bindToggleLinks)\x0a\x20*/\x0a\x0a(function()\x20{\x0a'use\x20strict';\x0a\x0a//\x20Mobile-friendly\x20topbar\x20menu\x0a$(function()\x20{\x0a\x20\x20var\x20menu\x20=\x20$('#menu');\x0a\x20\x20var\x20menuButton\x20=\x20$('#menu-button');\x0a\x20\x20var\x20menuButtonArrow\x20=\x20$('#menu-button-arrow');\x0a\x20\x20menuButton.click(function(event)\x20{\x0a\x20\x20\x20\x20menu.toggleClass('menu-visible');\x0a\x20\x20\x20\x20menuButtonArrow.toggleClass('vertical-flip');\x0a\x20\x20\x20\x20event.preventDefault();\x0a\x20\x20\x20\x20return\x20false;\x0a\x20\x20});\x0a});\x0a\x0a/*\x20Generates\x20a\x20table\x20of\x20contents:\x20looks\x20for\x20h2\x20and\x20h3\x20elements\x20and\x20generates\x0a\x20*\x20links.\x20\"Decorates\"\x20the\x20element\x20with\x20id==\"nav\"\x20with\x20this\x20table\x20of\x20contents.\x0a\x20*/\x0afunction\x20generateTOC()\x20{\x0a\x20\x20if\x20($('#manual-nav').length\x20>\x200)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20//\x20For\x20search,\x20we\x20send\x20the\x20toc\x20precomputed\x20from\x20server-side.\x0a\x20\x20//\x20TODO:\x20Ideally,\x20this\x20should\x20always\x20be\x20precomputed\x20for\x20all\x20pages,\x20but\x20then\x0a\x20\x20//\x20we\x20need\x20to\x20do\x20HTML\x20parsing\x20on\x20the\x20server-side.\x0a\x20\x20if\x20(location.pathname\x20===\x20'/search')\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20nav\x20=\x20$('#nav');\x0a\x20\x20if\x20(nav.length\x20===\x200)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20toc_items\x20=\x20[];\x0a\x20\x20$(nav).nextAll('h2,\x20h3').each(function()\x20{\x0a\x20\x20\x20\x20var\x20node\x20=\x20this;\x0a\x20\x20\x20\x20if\x20(node.id\x20==\x20'')\x0a\x20\x20\x20\x20\x20\x20node.id\x20=\x20'tmp_'\x20+\x20toc_items.length;\x0a\x20\x20\x20\x20var\x20link\x20=\x20$('').attr('href',\x20'#'\x20+\x20node.id).text($(node).text());\x0a\x20\x20\x20\x20var\x20item;\x0a\x20\x20\x20\x20if\x20($(node).is('h2'))\x20{\x0a\x20\x20\x20\x20\x20\x20item\x20=\x20$('
        ');\x0a\x20\x20\x20\x20}\x20else\x20{\x20//\x20h3\x0a\x20\x20\x20\x20\x20\x20item\x20=\x20$('');\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20item.append(link);\x0a\x20\x20\x20\x20toc_items.push(item);\x0a\x20\x20});\x0a\x20\x20if\x20(toc_items.length\x20<=\x201)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x20\x20var\x20dl1\x20=\x20$('
        ');\x0a\x20\x20var\x20dl2\x20=\x20$('
        ');\x0a\x0a\x20\x20var\x20split_index\x20=\x20(toc_items.length\x20/\x202)\x20+\x201;\x0a\x20\x20if\x20(split_index\x20<\x208)\x20{\x0a\x20\x20\x20\x20split_index\x20=\x20toc_items.length;\x0a\x20\x20}\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20split_index;\x20i++)\x20{\x0a\x20\x20\x20\x20dl1.append(toc_items[i]);\x0a\x20\x20}\x0a\x20\x20for\x20(/*\x20keep\x20using\x20i\x20*/;\x20i\x20<\x20toc_items.length;\x20i++)\x20{\x0a\x20\x20\x20\x20dl2.append(toc_items[i]);\x0a\x20\x20}\x0a\x0a\x20\x20var\x20tocTable\x20=\x20$('').appendTo(nav);\x0a\x20\x20var\x20tocBody\x20=\x20$('').appendTo(tocTable);\x0a\x20\x20var\x20tocRow\x20=\x20$('').appendTo(tocBody);\x0a\x0a\x20\x20//\x201st\x20column\x0a\x20\x20$('').appendTo(tocRow).append(dl1);\x0a\x20\x20//\x202nd\x20column\x0a\x20\x20$('').appendTo(tocRow).append(dl2);\x0a}\x0a\x0afunction\x20bindToggle(el)\x20{\x0a\x20\x20$('.toggleButton',\x20el).click(function()\x20{\x0a\x20\x20\x20\x20if\x20($(this).closest(\".toggle,\x20.toggleVisible\")[0]\x20!=\x20el)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Only\x20trigger\x20the\x20closest\x20toggle\x20header.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20($(el).is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20$(el).addClass('toggleVisible').removeClass('toggle');\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20$(el).addClass('toggle').removeClass('toggleVisible');\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0a\x0afunction\x20bindToggles(selector)\x20{\x0a\x20\x20$(selector).each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20bindToggle(el);\x0a\x20\x20});\x0a}\x0a\x0afunction\x20bindToggleLink(el,\x20prefix)\x20{\x0a\x20\x20$(el).click(function()\x20{\x0a\x20\x20\x20\x20var\x20href\x20=\x20$(el).attr('href');\x0a\x20\x20\x20\x20var\x20i\x20=\x20href.indexOf('#'+prefix);\x0a\x20\x20\x20\x20if\x20(i\x20<\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20id\x20=\x20'#'\x20+\x20prefix\x20+\x20href.slice(i+1+prefix.length);\x0a\x20\x20\x20\x20if\x20($(id).is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20$(id).find('.toggleButton').first().click();\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0afunction\x20bindToggleLinks(selector,\x20prefix)\x20{\x0a\x20\x20$(selector).each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20bindToggleLink(el,\x20prefix);\x0a\x20\x20});\x0a}\x0a\x0afunction\x20setupDropdownPlayground()\x20{\x0a\x20\x20if\x20(!$('#page').is('.wide'))\x20{\x0a\x20\x20\x20\x20return;\x20//\x20don't\x20show\x20on\x20front\x20page\x0a\x20\x20}\x0a\x20\x20var\x20button\x20=\x20$('#playgroundButton');\x0a\x20\x20var\x20div\x20=\x20$('#playground');\x0a\x20\x20var\x20setup\x20=\x20false;\x0a\x20\x20button.toggle(function()\x20{\x0a\x20\x20\x20\x20button.addClass('active');\x0a\x20\x20\x20\x20div.show();\x0a\x20\x20\x20\x20if\x20(setup)\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20setup\x20=\x20true;\x0a\x20\x20\x20\x20playground({\x0a\x20\x20\x20\x20\x20\x20'codeEl':\x20$('.code',\x20div),\x0a\x20\x20\x20\x20\x20\x20'outputEl':\x20$('.output',\x20div),\x0a\x20\x20\x20\x20\x20\x20'runEl':\x20$('.run',\x20div),\x0a\x20\x20\x20\x20\x20\x20'fmtEl':\x20$('.fmt',\x20div),\x0a\x20\x20\x20\x20\x20\x20'shareEl':\x20$('.share',\x20div),\x0a\x20\x20\x20\x20\x20\x20'shareRedirect':\x20'//play.golang.org/p/'\x0a\x20\x20\x20\x20});\x0a\x20\x20},\x0a\x20\x20function()\x20{\x0a\x20\x20\x20\x20button.removeClass('active');\x0a\x20\x20\x20\x20div.hide();\x0a\x20\x20});\x0a\x20\x20$('#menu').css('min-width',\x20'+=60');\x0a\x0a\x20\x20//\x20Hide\x20inline\x20playground\x20if\x20we\x20click\x20somewhere\x20on\x20the\x20page.\x0a\x20\x20//\x20This\x20is\x20needed\x20in\x20mobile\x20devices,\x20where\x20the\x20\"Play\"\x20button\x0a\x20\x20//\x20is\x20not\x20clickable\x20once\x20the\x20playground\x20opens\x20up.\x0a\x20\x20$(\"#page\").click(function()\x20{\x0a\x20\x20\x20\x20if\x20(button.hasClass('active'))\x20{\x0a\x20\x20\x20\x20\x20\x20button.click();\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0a\x0afunction\x20setupInlinePlayground()\x20{\x0a\x09'use\x20strict';\x0a\x09//\x20Set\x20up\x20playground\x20when\x20each\x20element\x20is\x20toggled.\x0a\x09$('div.play').each(function\x20(i,\x20el)\x20{\x0a\x09\x09//\x20Set\x20up\x20playground\x20for\x20this\x20example.\x0a\x09\x09var\x20setup\x20=\x20function()\x20{\x0a\x09\x09\x09var\x20code\x20=\x20$('.code',\x20el);\x0a\x09\x09\x09playground({\x0a\x09\x09\x09\x09'codeEl':\x20\x20\x20code,\x0a\x09\x09\x09\x09'outputEl':\x20$('.output',\x20el),\x0a\x09\x09\x09\x09'runEl':\x20\x20\x20\x20$('.run',\x20el),\x0a\x09\x09\x09\x09'fmtEl':\x20\x20\x20\x20$('.fmt',\x20el),\x0a\x09\x09\x09\x09'shareEl':\x20\x20$('.share',\x20el),\x0a\x09\x09\x09\x09'shareRedirect':\x20'//play.golang.org/p/'\x0a\x09\x09\x09});\x0a\x0a\x09\x09\x09//\x20Make\x20the\x20code\x20textarea\x20resize\x20to\x20fit\x20content.\x0a\x09\x09\x09var\x20resize\x20=\x20function()\x20{\x0a\x09\x09\x09\x09code.height(0);\x0a\x09\x09\x09\x09var\x20h\x20=\x20code[0].scrollHeight;\x0a\x09\x09\x09\x09code.height(h+20);\x20//\x20minimize\x20bouncing.\x0a\x09\x09\x09\x09code.closest('.input').height(h);\x0a\x09\x09\x09};\x0a\x09\x09\x09code.on('keydown',\x20resize);\x0a\x09\x09\x09code.on('keyup',\x20resize);\x0a\x09\x09\x09code.keyup();\x20//\x20resize\x20now.\x0a\x09\x09};\x0a\x0a\x09\x09//\x20If\x20example\x20already\x20visible,\x20set\x20up\x20playground\x20now.\x0a\x09\x09if\x20($(el).is(':visible'))\x20{\x0a\x09\x09\x09setup();\x0a\x09\x09\x09return;\x0a\x09\x09}\x0a\x0a\x09\x09//\x20Otherwise,\x20set\x20up\x20playground\x20when\x20example\x20is\x20expanded.\x0a\x09\x09var\x20built\x20=\x20false;\x0a\x09\x09$(el).closest('.toggle').click(function()\x20{\x0a\x09\x09\x09//\x20Only\x20set\x20up\x20once.\x0a\x09\x09\x09if\x20(!built)\x20{\x0a\x09\x09\x09\x09setup();\x0a\x09\x09\x09\x09built\x20=\x20true;\x0a\x09\x09\x09}\x0a\x09\x09});\x0a\x09});\x0a}\x0a\x0a//\x20fixFocus\x20tries\x20to\x20put\x20focus\x20to\x20div#page\x20so\x20that\x20keyboard\x20navigation\x20works.\x0afunction\x20fixFocus()\x20{\x0a\x20\x20var\x20page\x20=\x20$('div#page');\x0a\x20\x20var\x20topbar\x20=\x20$('div#topbar');\x0a\x20\x20page.css('outline',\x200);\x20//\x20disable\x20outline\x20when\x20focused\x0a\x20\x20page.attr('tabindex',\x20-1);\x20//\x20and\x20set\x20tabindex\x20so\x20that\x20it\x20is\x20focusable\x0a\x20\x20$(window).resize(function\x20(evt)\x20{\x0a\x20\x20\x20\x20//\x20only\x20focus\x20page\x20when\x20the\x20topbar\x20is\x20at\x20fixed\x20position\x20(that\x20is,\x20it's\x20in\x0a\x20\x20\x20\x20//\x20front\x20of\x20page,\x20and\x20keyboard\x20event\x20will\x20go\x20to\x20the\x20former\x20by\x20default.)\x0a\x20\x20\x20\x20//\x20by\x20focusing\x20page,\x20keyboard\x20event\x20will\x20go\x20to\x20page\x20so\x20that\x20up/down\x20arrow,\x0a\x20\x20\x20\x20//\x20space,\x20etc.\x20will\x20work\x20as\x20expected.\x0a\x20\x20\x20\x20if\x20(topbar.css('position')\x20==\x20\"fixed\")\x0a\x20\x20\x20\x20\x20\x20page.focus();\x0a\x20\x20}).resize();\x0a}\x0a\x0afunction\x20toggleHash()\x20{\x0a\x20\x20var\x20id\x20=\x20window.location.hash.substring(1);\x0a\x20\x20//\x20Open\x20all\x20of\x20the\x20toggles\x20for\x20a\x20particular\x20hash.\x0a\x20\x20var\x20els\x20=\x20$(\x0a\x20\x20\x20\x20document.getElementById(id),\x0a\x20\x20\x20\x20$('a[name]').filter(function()\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20$(this).attr('name')\x20==\x20id;\x0a\x20\x20\x20\x20})\x0a\x20\x20);\x0a\x0a\x20\x20while\x20(els.length)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20els.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20el\x20=\x20$(els[i]);\x0a\x20\x20\x20\x20\x20\x20if\x20(el.is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.find('.toggleButton').first().click();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20els\x20=\x20el.parent();\x0a\x20\x20}\x0a}\x0a\x0afunction\x20personalizeInstallInstructions()\x20{\x0a\x20\x20var\x20prefix\x20=\x20'?download=';\x0a\x20\x20var\x20s\x20=\x20window.location.search;\x0a\x20\x20if\x20(s.indexOf(prefix)\x20!=\x200)\x20{\x0a\x20\x20\x20\x20//\x20No\x20'download'\x20query\x20string;\x20detect\x20\"test\"\x20instructions\x20from\x20User\x20Agent.\x0a\x20\x20\x20\x20if\x20(navigator.platform.indexOf('Win')\x20!=\x20-1)\x20{\x0a\x20\x20\x20\x20\x20\x20$('.testUnix').hide();\x0a\x20\x20\x20\x20\x20\x20$('.testWindows').show();\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20$('.testUnix').show();\x0a\x20\x20\x20\x20\x20\x20$('.testWindows').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20filename\x20=\x20s.substr(prefix.length);\x0a\x20\x20var\x20filenameRE\x20=\x20/^go1\\.\\d+(\\.\\d+)?([a-z0-9]+)?\\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\\.[68])?\\.([a-z.]+)$/;\x0a\x20\x20var\x20m\x20=\x20filenameRE.exec(filename);\x0a\x20\x20if\x20(!m)\x20{\x0a\x20\x20\x20\x20//\x20Can't\x20interpret\x20file\x20name;\x20bail.\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x20\x20$('.downloadFilename').text(filename);\x0a\x20\x20$('.hideFromDownload').hide();\x0a\x0a\x20\x20var\x20os\x20=\x20m[3];\x0a\x20\x20var\x20ext\x20=\x20m[6];\x0a\x20\x20if\x20(ext\x20!=\x20'tar.gz')\x20{\x0a\x20\x20\x20\x20$('#tarballInstructions').hide();\x0a\x20\x20}\x0a\x20\x20if\x20(os\x20!=\x20'darwin'\x20||\x20ext\x20!=\x20'pkg')\x20{\x0a\x20\x20\x20\x20$('#darwinPackageInstructions').hide();\x0a\x20\x20}\x0a\x20\x20if\x20(os\x20!=\x20'windows')\x20{\x0a\x20\x20\x20\x20$('#windowsInstructions').hide();\x0a\x20\x20\x20\x20$('.testUnix').show();\x0a\x20\x20\x20\x20$('.testWindows').hide();\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20if\x20(ext\x20!=\x20'msi')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#windowsInstallerInstructions').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(ext\x20!=\x20'zip')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#windowsZipInstructions').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20$('.testUnix').hide();\x0a\x20\x20\x20\x20$('.testWindows').show();\x0a\x20\x20}\x0a\x0a\x20\x20var\x20download\x20=\x20\"https://dl.google.com/go/\"\x20+\x20filename;\x0a\x0a\x20\x20var\x20message\x20=\x20$(''+\x0a\x20\x20\x20\x20'Your\x20download\x20should\x20begin\x20shortly.\x20'+\x0a\x20\x20\x20\x20'If\x20it\x20does\x20not,\x20click\x20this\x20link.

        ');\x0a\x20\x20message.find('a').attr('href',\x20download);\x0a\x20\x20message.insertAfter('#nav');\x0a\x0a\x20\x20window.location\x20=\x20download;\x0a}\x0a\x0afunction\x20updateVersionTags()\x20{\x0a\x20\x20var\x20v\x20=\x20window.goVersion;\x0a\x20\x20if\x20(/^go[0-9.]+$/.test(v))\x20{\x0a\x20\x20\x20\x20$(\".versionTag\").empty().text(v);\x0a\x20\x20\x20\x20$(\".whereTag\").hide();\x0a\x20\x20}\x0a}\x0a\x0afunction\x20addPermalinks()\x20{\x0a\x20\x20function\x20addPermalink(source,\x20parent)\x20{\x0a\x20\x20\x20\x20var\x20id\x20=\x20source.attr(\"id\");\x0a\x20\x20\x20\x20if\x20(id\x20==\x20\"\"\x20||\x20id.indexOf(\"tmp_\")\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Auto-generated\x20permalink.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(parent.find(\">\x20.permalink\").length)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Already\x20attached.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20parent.append(\"\x20\").append($(\"¶\").attr(\"href\",\x20\"#\"\x20+\x20id));\x0a\x20\x20}\x0a\x0a\x20\x20$(\"#page\x20.container\").find(\"h2[id],\x20h3[id]\").each(function()\x20{\x0a\x20\x20\x20\x20var\x20el\x20=\x20$(this);\x0a\x20\x20\x20\x20addPermalink(el,\x20el);\x0a\x20\x20});\x0a\x0a\x20\x20$(\"#page\x20.container\").find(\"dl[id]\").each(function()\x20{\x0a\x20\x20\x20\x20var\x20el\x20=\x20$(this);\x0a\x20\x20\x20\x20//\x20Add\x20the\x20anchor\x20to\x20the\x20\"dt\"\x20element.\x0a\x20\x20\x20\x20addPermalink(el,\x20el.find(\">\x20dt\").first());\x0a\x20\x20});\x0a}\x0a\x0a$(\".js-expandAll\").click(function()\x20{\x0a\x20\x20if\x20($(this).hasClass(\"collapsed\"))\x20{\x0a\x20\x20\x20\x20toggleExamples('toggle');\x0a\x20\x20\x20\x20$(this).text(\"(Collapse\x20All)\");\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20toggleExamples('toggleVisible');\x0a\x20\x20\x20\x20$(this).text(\"(Expand\x20All)\");\x0a\x20\x20}\x0a\x20\x20$(this).toggleClass(\"collapsed\")\x0a});\x0a\x0afunction\x20toggleExamples(className)\x20{\x0a\x20\x20//\x20We\x20need\x20to\x20explicitly\x20iterate\x20through\x20divs\x20starting\x20with\x20\"example_\"\x0a\x20\x20//\x20to\x20avoid\x20toggling\x20Overview\x20and\x20Index\x20collapsibles.\x0a\x20\x20$(\"[id^='example_']\").each(function()\x20{\x0a\x20\x20\x20\x20//\x20Check\x20for\x20state\x20and\x20click\x20it\x20only\x20if\x20required.\x0a\x20\x20\x20\x20if\x20($(this).hasClass(className))\x20{\x0a\x20\x20\x20\x20\x20\x20$(this).find('.toggleButton').first().click();\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0a\x0a$(document).ready(function()\x20{\x0a\x20\x20generateTOC();\x0a\x20\x20addPermalinks();\x0a\x20\x20bindToggles(\".toggle\");\x0a\x20\x20bindToggles(\".toggleVisible\");\x0a\x20\x20bindToggleLinks(\".exampleLink\",\x20\"example_\");\x0a\x20\x20bindToggleLinks(\".overviewLink\",\x20\"\");\x0a\x20\x20bindToggleLinks(\".examplesLink\",\x20\"\");\x0a\x20\x20bindToggleLinks(\".indexLink\",\x20\"\");\x0a\x20\x20setupDropdownPlayground();\x0a\x20\x20setupInlinePlayground();\x0a\x20\x20fixFocus();\x0a\x20\x20setupTypeInfo();\x0a\x20\x20setupCallgraphs();\x0a\x20\x20toggleHash();\x0a\x20\x20personalizeInstallInstructions();\x0a\x20\x20updateVersionTags();\x0a\x0a\x20\x20//\x20godoc.html\x20defines\x20window.initFuncs\x20in\x20the\x20\x20tag,\x20and\x20root.html\x20and\x0a\x20\x20//\x20codewalk.js\x20push\x20their\x20on-page-ready\x20functions\x20to\x20the\x20list.\x0a\x20\x20//\x20We\x20execute\x20those\x20functions\x20here,\x20to\x20avoid\x20loading\x20jQuery\x20until\x20the\x20page\x0a\x20\x20//\x20content\x20is\x20loaded.\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20window.initFuncs.length;\x20i++)\x20window.initFuncs[i]();\x0a});\x0a\x0a//\x20--\x20analysis\x20---------------------------------------------------------\x0a\x0a//\x20escapeHTML\x20returns\x20HTML\x20for\x20s,\x20with\x20metacharacters\x20quoted.\x0a//\x20It\x20is\x20safe\x20for\x20use\x20in\x20both\x20elements\x20and\x20attributes\x0a//\x20(unlike\x20the\x20\"set\x20innerText,\x20read\x20innerHTML\"\x20trick).\x0afunction\x20escapeHTML(s)\x20{\x0a\x20\x20\x20\x20return\x20s.replace(/&/g,\x20'&').\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20replace(/\\\"/g,\x20'"').\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20replace(/\\'/g,\x20''').\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20replace(//g,\x20'>');\x0a}\x0a\x0a//\x20makeAnchor\x20returns\x20HTML\x20for\x20an\x20\x20element,\x20given\x20an\x20anchorJSON\x20object.\x0afunction\x20makeAnchor(json)\x20{\x0a\x20\x20var\x20html\x20=\x20escapeHTML(json.Text);\x0a\x20\x20if\x20(json.Href\x20!=\x20\"\")\x20{\x0a\x20\x20\x20\x20\x20\x20html\x20=\x20\"\"\x20+\x20html\x20+\x20\"\";\x0a\x20\x20}\x0a\x20\x20return\x20html;\x0a}\x0a\x0afunction\x20showLowFrame(html)\x20{\x0a\x20\x20var\x20lowframe\x20=\x20document.getElementById('lowframe');\x0a\x20\x20lowframe.style.height\x20=\x20\"200px\";\x0a\x20\x20lowframe.innerHTML\x20=\x20\"\"\x20+\x20html\x20+\x20\"

        \\n\"\x20+\x0a\x20\x20\x20\x20\x20\x20\"\xe2\x9c\x98\"\x0a};\x0a\x0adocument.hideLowFrame\x20=\x20function()\x20{\x0a\x20\x20var\x20lowframe\x20=\x20document.getElementById('lowframe');\x0a\x20\x20lowframe.style.height\x20=\x20\"0px\";\x0a}\x0a\x0a//\x20onClickCallers\x20is\x20the\x20onclick\x20action\x20for\x20the\x20'func'\x20tokens\x20of\x20a\x0a//\x20function\x20declaration.\x0adocument.onClickCallers\x20=\x20function(index)\x20{\x0a\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[index]\x0a\x20\x20if\x20(data.Callers.length\x20==\x201\x20&&\x20data.Callers[0].Sites.length\x20==\x201)\x20{\x0a\x20\x20\x20\x20document.location\x20=\x20data.Callers[0].Sites[0].Href;\x20//\x20jump\x20to\x20sole\x20caller\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20html\x20=\x20\"Callers\x20of\x20\"\x20+\x20escapeHTML(data.Callee)\x20+\x20\":
        \\n\";\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20data.Callers.length;\x20i++)\x20{\x0a\x20\x20\x20\x20var\x20caller\x20=\x20data.Callers[i];\x0a\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20escapeHTML(caller.Func)\x20+\x20\"\";\x0a\x20\x20\x20\x20var\x20sites\x20=\x20caller.Sites;\x0a\x20\x20\x20\x20if\x20(sites\x20!=\x20null\x20&&\x20sites.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20html\x20+=\x20\"\x20at\x20line\x20\";\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20j\x20=\x200;\x20j\x20<\x20sites.length;\x20j++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(j\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20\",\x20\";\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20makeAnchor(sites[j])\x20+\x20\"\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20html\x20+=\x20\"
        \\n\";\x0a\x20\x20}\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a//\x20onClickCallees\x20is\x20the\x20onclick\x20action\x20for\x20the\x20'('\x20token\x20of\x20a\x20function\x20call.\x0adocument.onClickCallees\x20=\x20function(index)\x20{\x0a\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[index]\x0a\x20\x20if\x20(data.Callees.length\x20==\x201)\x20{\x0a\x20\x20\x20\x20document.location\x20=\x20data.Callees[0].Href;\x20//\x20jump\x20to\x20sole\x20callee\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20html\x20=\x20\"Callees\x20of\x20this\x20\"\x20+\x20escapeHTML(data.Descr)\x20+\x20\":
        \\n\";\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20data.Callees.length;\x20i++)\x20{\x0a\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20makeAnchor(data.Callees[i])\x20+\x20\"
        \\n\";\x0a\x20\x20}\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a//\x20onClickTypeInfo\x20is\x20the\x20onclick\x20action\x20for\x20identifiers\x20declaring\x20a\x20named\x20type.\x0adocument.onClickTypeInfo\x20=\x20function(index)\x20{\x0a\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[index];\x0a\x20\x20var\x20html\x20=\x20\"Type\x20\"\x20+\x20data.Name\x20+\x20\":\x20\"\x20+\x0a\x20\x20\"      (size=\"\x20+\x20data.Size\x20+\x20\",\x20align=\"\x20+\x20data.Align\x20+\x20\")
        \\n\";\x0a\x20\x20html\x20+=\x20implementsHTML(data);\x0a\x20\x20html\x20+=\x20methodsetHTML(data);\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a//\x20implementsHTML\x20returns\x20HTML\x20for\x20the\x20implements\x20relation\x20of\x20the\x0a//\x20specified\x20TypeInfoJSON\x20value.\x0afunction\x20implementsHTML(info)\x20{\x0a\x20\x20var\x20html\x20=\x20\"\";\x0a\x20\x20if\x20(info.ImplGroups\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20info.ImplGroups.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20group\x20=\x20info.ImplGroups[i];\x0a\x20\x20\x20\x20\x20\x20var\x20x\x20=\x20\"\"\x20+\x20escapeHTML(group.Descr)\x20+\x20\"\x20\";\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20j\x20=\x200;\x20j\x20<\x20group.Facts.length;\x20j++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20fact\x20=\x20group.Facts[j];\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20y\x20=\x20\"\"\x20+\x20makeAnchor(fact.Other)\x20+\x20\"\";\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fact.ByKind\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20escapeHTML(fact.ByKind)\x20+\x20\"\x20type\x20\"\x20+\x20y\x20+\x20\"\x20implements\x20\"\x20+\x20x;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20x\x20+\x20\"\x20implements\x20\"\x20+\x20y;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20\"
        \\n\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20return\x20html;\x0a}\x0a\x0a\x0a//\x20methodsetHTML\x20returns\x20HTML\x20for\x20the\x20methodset\x20of\x20the\x20specified\x0a//\x20TypeInfoJSON\x20value.\x0afunction\x20methodsetHTML(info)\x20{\x0a\x20\x20var\x20html\x20=\x20\"\";\x0a\x20\x20if\x20(info.Methods\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20info.Methods.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20makeAnchor(info.Methods[i])\x20+\x20\"
        \\n\";\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20return\x20html;\x0a}\x0a\x0a//\x20onClickComm\x20is\x20the\x20onclick\x20action\x20for\x20channel\x20\"make\"\x20and\x20\"<-\"\x0a//\x20send/receive\x20tokens.\x0adocument.onClickComm\x20=\x20function(index)\x20{\x0a\x20\x20var\x20ops\x20=\x20document.ANALYSIS_DATA[index].Ops\x0a\x20\x20if\x20(ops.length\x20==\x201)\x20{\x0a\x20\x20\x20\x20document.location\x20=\x20ops[0].Op.Href;\x20//\x20jump\x20to\x20sole\x20element\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20html\x20=\x20\"Operations\x20on\x20this\x20channel:
        \\n\";\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20ops.length;\x20i++)\x20{\x0a\x20\x20\x20\x20html\x20+=\x20makeAnchor(ops[i].Op)\x20+\x20\"\x20by\x20\"\x20+\x20escapeHTML(ops[i].Fn)\x20+\x20\"
        \\n\";\x0a\x20\x20}\x0a\x20\x20if\x20(ops.length\x20==\x200)\x20{\x0a\x20\x20\x20\x20html\x20+=\x20\"(none)
        \\n\";\x0a\x20\x20}\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a$(window).load(function()\x20{\x0a\x20\x20\x20\x20//\x20Scroll\x20window\x20so\x20that\x20first\x20selection\x20is\x20visible.\x0a\x20\x20\x20\x20//\x20(This\x20means\x20we\x20don't\x20need\x20to\x20emit\x20id='L%d'\x20spans\x20for\x20each\x20line.)\x0a\x20\x20\x20\x20//\x20TODO(adonovan):\x20ideally,\x20scroll\x20it\x20so\x20that\x20it's\x20under\x20the\x20pointer,\x0a\x20\x20\x20\x20//\x20but\x20I\x20don't\x20know\x20how\x20to\x20get\x20the\x20pointer\x20y\x20coordinate.\x0a\x20\x20\x20\x20var\x20elts\x20=\x20document.getElementsByClassName(\"selection\");\x0a\x20\x20\x20\x20if\x20(elts.length\x20>\x200)\x20{\x0a\x09elts[0].scrollIntoView()\x0a\x20\x20\x20\x20}\x0a});\x0a\x0a//\x20setupTypeInfo\x20populates\x20the\x20\"Implements\"\x20and\x20\"Method\x20set\"\x20toggle\x20for\x0a//\x20each\x20type\x20in\x20the\x20package\x20doc.\x0afunction\x20setupTypeInfo()\x20{\x0a\x20\x20for\x20(var\x20i\x20in\x20document.ANALYSIS_DATA)\x20{\x0a\x20\x20\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[i];\x0a\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\"implements-\"\x20+\x20i);\x0a\x20\x20\x20\x20if\x20(el\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20el\x20!=\x20null\x20=>\x20data\x20is\x20TypeInfoJSON.\x0a\x20\x20\x20\x20\x20\x20if\x20(data.ImplGroups\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.innerHTML\x20=\x20implementsHTML(data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.parentNode.parentNode.style.display\x20=\x20\"block\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\"methodset-\"\x20+\x20i);\x0a\x20\x20\x20\x20if\x20(el\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20el\x20!=\x20null\x20=>\x20data\x20is\x20TypeInfoJSON.\x0a\x20\x20\x20\x20\x20\x20if\x20(data.Methods\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.innerHTML\x20=\x20methodsetHTML(data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.parentNode.parentNode.style.display\x20=\x20\"block\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a}\x0a\x0afunction\x20setupCallgraphs()\x20{\x0a\x20\x20if\x20(document.CALLGRAPH\x20==\x20null)\x20{\x0a\x20\x20\x20\x20return\x0a\x20\x20}\x0a\x20\x20document.getElementById(\"pkg-callgraph\").style.display\x20=\x20\"block\";\x0a\x0a\x20\x20var\x20treeviews\x20=\x20document.getElementsByClassName(\"treeview\");\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20treeviews.length;\x20i++)\x20{\x0a\x20\x20\x20\x20var\x20tree\x20=\x20treeviews[i];\x0a\x20\x20\x20\x20if\x20(tree.id\x20==\x20null\x20||\x20tree.id.indexOf(\"callgraph-\")\x20!=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20continue;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20id\x20=\x20tree.id.substring(\"callgraph-\".length);\x0a\x20\x20\x20\x20$(tree).treeview({collapsed:\x20true,\x20animated:\x20\"fast\"});\x0a\x20\x20\x20\x20document.cgAddChildren(tree,\x20tree,\x20[id]);\x0a\x20\x20\x20\x20tree.parentNode.parentNode.style.display\x20=\x20\"block\";\x0a\x20\x20}\x0a}\x0a\x0adocument.cgAddChildren\x20=\x20function(tree,\x20ul,\x20indices)\x20{\x0a\x20\x20if\x20(indices\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20indices.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20li\x20=\x20cgAddChild(tree,\x20ul,\x20document.CALLGRAPH[indices[i]]);\x0a\x20\x20\x20\x20\x20\x20if\x20(i\x20==\x20indices.length\x20-\x201)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$(li).addClass(\"last\");\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20$(tree).treeview({animated:\x20\"fast\",\x20add:\x20ul});\x0a}\x0a\x0a//\x20cgAddChild\x20adds\x20an\x20
      • \x20element\x20for\x20document.CALLGRAPH\x20node\x20cgn\x20to\x0a//\x20the\x20parent\x20
          \x20element\x20ul.\x20tree\x20is\x20the\x20tree's\x20root\x20
            \x20element.\x0afunction\x20cgAddChild(tree,\x20ul,\x20cgn)\x20{\x0a\x20\x20\x20var\x20li\x20=\x20document.createElement(\"li\");\x0a\x20\x20\x20ul.appendChild(li);\x0a\x20\x20\x20li.className\x20=\x20\"closed\";\x0a\x0a\x20\x20\x20var\x20code\x20=\x20document.createElement(\"code\");\x0a\x0a\x20\x20\x20if\x20(cgn.Callees\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20$(li).addClass(\"expandable\");\x0a\x0a\x20\x20\x20\x20\x20//\x20Event\x20handlers\x20and\x20innerHTML\x20updates\x20don't\x20play\x20nicely\x20together,\x0a\x20\x20\x20\x20\x20//\x20hence\x20all\x20this\x20explicit\x20DOM\x20manipulation.\x0a\x20\x20\x20\x20\x20var\x20hitarea\x20=\x20document.createElement(\"div\");\x0a\x20\x20\x20\x20\x20hitarea.className\x20=\x20\"hitarea\x20expandable-hitarea\";\x0a\x20\x20\x20\x20\x20li.appendChild(hitarea);\x0a\x0a\x20\x20\x20\x20\x20li.appendChild(code);\x0a\x0a\x20\x20\x20\x20\x20var\x20childUL\x20=\x20document.createElement(\"ul\");\x0a\x20\x20\x20\x20\x20li.appendChild(childUL);\x0a\x20\x20\x20\x20\x20childUL.setAttribute('style',\x20\"display:\x20none;\");\x0a\x0a\x20\x20\x20\x20\x20var\x20onClick\x20=\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20document.cgAddChildren(tree,\x20childUL,\x20cgn.Callees);\x0a\x20\x20\x20\x20\x20\x20\x20hitarea.removeEventListener('click',\x20onClick)\x0a\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20hitarea.addEventListener('click',\x20onClick);\x0a\x0a\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20li.appendChild(code);\x0a\x20\x20\x20}\x0a\x20\x20\x20code.innerHTML\x20+=\x20\" \"\x20+\x20makeAnchor(cgn.Func);\x0a\x20\x20\x20return\x20li\x0a}\x0a\x0a})();\x0a", "images/minus.gif": "GIF89a\x09\x00\x09\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\x09\x00\x09\x00\x00\x08\"\x00\x03\x08\x1cH\xf0\x9f\xc1\x83\xff\x04\"<\xa8pa\xc2\x00\xff\x00H\x94\xf8\xd0aE\x87\x0d\x17\x12\xdc\x18\x20\x20\x00;", @@ -93,7 +93,7 @@ var Files = map[string]string{ "playground.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0a/*\x0aIn\x20the\x20absence\x20of\x20any\x20formal\x20way\x20to\x20specify\x20interfaces\x20in\x20JavaScript,\x0ahere's\x20a\x20skeleton\x20implementation\x20of\x20a\x20playground\x20transport.\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20function\x20Transport()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Set\x20up\x20any\x20transport\x20state\x20(eg,\x20make\x20a\x20websocket\x20connection).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Compile\x20and\x20run\x20the\x20program\x20'body'\x20with\x20'options'.\x0a\x09\x09\x09\x09//\x20Call\x20the\x20'output'\x20callback\x20to\x20display\x20program\x20output.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kill:\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Kill\x20the\x20running\x20program.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x09//\x20The\x20output\x20callback\x20is\x20called\x20multiple\x20times,\x20and\x20each\x20time\x20it\x20is\x0a\x09//\x20passed\x20an\x20object\x20of\x20this\x20form.\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20write\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kind:\x20'string',\x20//\x20'start',\x20'stdout',\x20'stderr',\x20'end'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Body:\x20'string'\x20\x20//\x20content\x20of\x20write\x20or\x20end\x20status\x20message\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x09//\x20The\x20first\x20call\x20must\x20be\x20of\x20Kind\x20'start'\x20with\x20no\x20body.\x0a\x09//\x20Subsequent\x20calls\x20may\x20be\x20of\x20Kind\x20'stdout'\x20or\x20'stderr'\x0a\x09//\x20and\x20must\x20have\x20a\x20non-null\x20Body\x20string.\x0a\x09//\x20The\x20final\x20call\x20should\x20be\x20of\x20Kind\x20'end'\x20with\x20an\x20optional\x0a\x09//\x20Body\x20string,\x20signifying\x20a\x20failure\x20(\"killed\",\x20for\x20example).\x0a\x0a\x09//\x20The\x20output\x20callback\x20must\x20be\x20of\x20this\x20form.\x0a\x09//\x20See\x20PlaygroundOutput\x20(below)\x20for\x20an\x20implementation.\x0a\x20\x20\x20\x20\x20\x20\x20\x20function\x20outputCallback(write)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a*/\x0a\x0a//\x20HTTPTransport\x20is\x20the\x20default\x20transport.\x0a//\x20enableVet\x20enables\x20running\x20vet\x20if\x20a\x20program\x20was\x20compiled\x20and\x20ran\x20successfully.\x0a//\x20If\x20vet\x20returned\x20any\x20errors,\x20display\x20them\x20before\x20the\x20output\x20of\x20a\x20program.\x0afunction\x20HTTPTransport(enableVet)\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09function\x20playback(output,\x20data)\x20{\x0a\x09\x09//\x20Backwards\x20compatibility:\x20default\x20values\x20do\x20not\x20affect\x20the\x20output.\x0a\x09\x09var\x20events\x20=\x20data.Events\x20||\x20[];\x0a\x09\x09var\x20errors\x20=\x20data.Errors\x20||\x20\"\";\x0a\x09\x09var\x20status\x20=\x20data.Status\x20||\x200;\x0a\x09\x09var\x20isTest\x20=\x20data.IsTest\x20||\x20false;\x0a\x09\x09var\x20testsFailed\x20=\x20data.TestsFailed\x20||\x200;\x0a\x0a\x09\x09var\x20timeout;\x0a\x09\x09output({Kind:\x20'start'});\x0a\x09\x09function\x20next()\x20{\x0a\x09\x09\x09if\x20(!events\x20||\x20events.length\x20===\x200)\x20{\x0a\x09\x09\x09\x09if\x20(isTest)\x20{\x0a\x09\x09\x09\x09\x09if\x20(testsFailed\x20>\x200)\x20{\x0a\x09\x09\x09\x09\x09\x09output({Kind:\x20'system',\x20Body:\x20'\\n'+testsFailed+'\x20test'+(testsFailed>1?'s':'')+'\x20failed.'});\x0a\x09\x09\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09\x09\x09output({Kind:\x20'system',\x20Body:\x20'\\nAll\x20tests\x20passed.'});\x0a\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09\x09if\x20(status\x20>\x200)\x20{\x0a\x09\x09\x09\x09\x09\x09output({Kind:\x20'end',\x20Body:\x20'status\x20'\x20+\x20status\x20+\x20'.'});\x0a\x09\x09\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09\x09\x09if\x20(errors\x20!==\x20\"\")\x20{\x0a\x09\x09\x09\x09\x09\x09\x09//\x20errors\x20are\x20displayed\x20only\x20in\x20the\x20case\x20of\x20timeout.\x0a\x09\x09\x09\x09\x09\x09\x09output({Kind:\x20'end',\x20Body:\x20errors\x20+\x20'.'});\x0a\x09\x09\x09\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09\x09\x09\x09output({Kind:\x20'end'});\x0a\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09\x09return;\x0a\x09\x09\x09}\x0a\x09\x09\x09var\x20e\x20=\x20events.shift();\x0a\x09\x09\x09if\x20(e.Delay\x20===\x200)\x20{\x0a\x09\x09\x09\x09output({Kind:\x20e.Kind,\x20Body:\x20e.Message});\x0a\x09\x09\x09\x09next();\x0a\x09\x09\x09\x09return;\x0a\x09\x09\x09}\x0a\x09\x09\x09timeout\x20=\x20setTimeout(function()\x20{\x0a\x09\x09\x09\x09output({Kind:\x20e.Kind,\x20Body:\x20e.Message});\x0a\x09\x09\x09\x09next();\x0a\x09\x09\x09},\x20e.Delay\x20/\x201000000);\x0a\x09\x09}\x0a\x09\x09next();\x0a\x09\x09return\x20{\x0a\x09\x09\x09Stop:\x20function()\x20{\x0a\x09\x09\x09\x09clearTimeout(timeout);\x0a\x09\x09\x09}\x0a\x09\x09};\x0a\x09}\x0a\x0a\x09function\x20error(output,\x20msg)\x20{\x0a\x09\x09output({Kind:\x20'start'});\x0a\x09\x09output({Kind:\x20'stderr',\x20Body:\x20msg});\x0a\x09\x09output({Kind:\x20'end'});\x0a\x09}\x0a\x0a\x09function\x20buildFailed(output,\x20msg)\x20{\x0a\x09\x09output({Kind:\x20'start'});\x0a\x09\x09output({Kind:\x20'stderr',\x20Body:\x20msg});\x0a\x09\x09output({Kind:\x20'system',\x20Body:\x20'\\nGo\x20build\x20failed.'});\x0a\x09}\x0a\x0a\x09var\x20seq\x20=\x200;\x0a\x09return\x20{\x0a\x09\x09Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x09\x09\x09seq++;\x0a\x09\x09\x09var\x20cur\x20=\x20seq;\x0a\x09\x09\x09var\x20playing;\x0a\x09\x09\x09$.ajax('/compile',\x20{\x0a\x09\x09\x09\x09type:\x20'POST',\x0a\x09\x09\x09\x09data:\x20{'version':\x202,\x20'body':\x20body},\x0a\x09\x09\x09\x09dataType:\x20'json',\x0a\x09\x09\x09\x09success:\x20function(data)\x20{\x0a\x09\x09\x09\x09\x09if\x20(seq\x20!=\x20cur)\x20return;\x0a\x09\x09\x09\x09\x09if\x20(!data)\x20return;\x0a\x09\x09\x09\x09\x09if\x20(playing\x20!=\x20null)\x20playing.Stop();\x0a\x09\x09\x09\x09\x09if\x20(data.Errors)\x20{\x0a\x09\x09\x09\x09\x09\x09if\x20(data.Errors\x20===\x20'process\x20took\x20too\x20long')\x20{\x0a\x09\x09\x09\x09\x09\x09\x09//\x20Playback\x20the\x20output\x20that\x20was\x20captured\x20before\x20the\x20timeout.\x0a\x09\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data);\x0a\x09\x09\x09\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09\x09\x09\x09buildFailed(output,\x20data.Errors);\x0a\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09\x09return;\x0a\x09\x09\x09\x09\x09}\x0a\x0a\x09\x09\x09\x09\x09if\x20(!enableVet)\x20{\x0a\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data);\x0a\x09\x09\x09\x09\x09\x09return;\x0a\x09\x09\x09\x09\x09}\x0a\x0a\x09\x09\x09\x09\x09$.ajax(\"/vet\",\x20{\x0a\x09\x09\x09\x09\x09\x09data:\x20{\"body\":\x20body},\x0a\x09\x09\x09\x09\x09\x09type:\x20\"POST\",\x0a\x09\x09\x09\x09\x09\x09dataType:\x20\"json\",\x0a\x09\x09\x09\x09\x09\x09success:\x20function(dataVet)\x20{\x0a\x09\x09\x09\x09\x09\x09\x09if\x20(dataVet.Errors)\x20{\x0a\x09\x09\x09\x09\x09\x09\x09\x09if\x20(!data.Events)\x20{\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09data.Events\x20=\x20[];\x0a\x09\x09\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09\x09\x09\x09//\x20inject\x20errors\x20from\x20the\x20vet\x20as\x20the\x20first\x20events\x20in\x20the\x20output\x0a\x09\x09\x09\x09\x09\x09\x09\x09data.Events.unshift({Message:\x20'Go\x20vet\x20exited.\\n\\n',\x20Kind:\x20'system',\x20Delay:\x200});\x0a\x09\x09\x09\x09\x09\x09\x09\x09data.Events.unshift({Message:\x20dataVet.Errors,\x20Kind:\x20'stderr',\x20Delay:\x200});\x0a\x09\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data);\x0a\x09\x09\x09\x09\x09\x09},\x0a\x09\x09\x09\x09\x09\x09error:\x20function()\x20{\x0a\x09\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data);\x0a\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09});\x0a\x09\x09\x09\x09},\x0a\x09\x09\x09\x09error:\x20function()\x20{\x0a\x09\x09\x09\x09\x09error(output,\x20'Error\x20communicating\x20with\x20remote\x20server.');\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09});\x0a\x09\x09\x09return\x20{\x0a\x09\x09\x09\x09Kill:\x20function()\x20{\x0a\x09\x09\x09\x09\x09if\x20(playing\x20!=\x20null)\x20playing.Stop();\x0a\x09\x09\x09\x09\x09output({Kind:\x20'end',\x20Body:\x20'killed'});\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09};\x0a\x09\x09}\x0a\x09};\x0a}\x0a\x0afunction\x20SocketTransport()\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09var\x20id\x20=\x200;\x0a\x09var\x20outputs\x20=\x20{};\x0a\x09var\x20started\x20=\x20{};\x0a\x09var\x20websocket;\x0a\x09if\x20(window.location.protocol\x20==\x20\"http:\")\x20{\x0a\x09\x09websocket\x20=\x20new\x20WebSocket('ws://'\x20+\x20window.location.host\x20+\x20'/socket');\x0a\x09}\x20else\x20if\x20(window.location.protocol\x20==\x20\"https:\")\x20{\x0a\x09\x09websocket\x20=\x20new\x20WebSocket('wss://'\x20+\x20window.location.host\x20+\x20'/socket');\x0a\x09}\x0a\x0a\x09websocket.onclose\x20=\x20function()\x20{\x0a\x09\x09console.log('websocket\x20connection\x20closed');\x0a\x09};\x0a\x0a\x09websocket.onmessage\x20=\x20function(e)\x20{\x0a\x09\x09var\x20m\x20=\x20JSON.parse(e.data);\x0a\x09\x09var\x20output\x20=\x20outputs[m.Id];\x0a\x09\x09if\x20(output\x20===\x20null)\x0a\x09\x09\x09return;\x0a\x09\x09if\x20(!started[m.Id])\x20{\x0a\x09\x09\x09output({Kind:\x20'start'});\x0a\x09\x09\x09started[m.Id]\x20=\x20true;\x0a\x09\x09}\x0a\x09\x09output({Kind:\x20m.Kind,\x20Body:\x20m.Body});\x0a\x09};\x0a\x0a\x09function\x20send(m)\x20{\x0a\x09\x09websocket.send(JSON.stringify(m));\x0a\x09}\x0a\x0a\x09return\x20{\x0a\x09\x09Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x09\x09\x09var\x20thisID\x20=\x20id+'';\x0a\x09\x09\x09id++;\x0a\x09\x09\x09outputs[thisID]\x20=\x20output;\x0a\x09\x09\x09send({Id:\x20thisID,\x20Kind:\x20'run',\x20Body:\x20body,\x20Options:\x20options});\x0a\x09\x09\x09return\x20{\x0a\x09\x09\x09\x09Kill:\x20function()\x20{\x0a\x09\x09\x09\x09\x09send({Id:\x20thisID,\x20Kind:\x20'kill'});\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09};\x0a\x09\x09}\x0a\x09};\x0a}\x0a\x0afunction\x20PlaygroundOutput(el)\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09return\x20function(write)\x20{\x0a\x09\x09if\x20(write.Kind\x20==\x20'start')\x20{\x0a\x09\x09\x09el.innerHTML\x20=\x20'';\x0a\x09\x09\x09return;\x0a\x09\x09}\x0a\x0a\x09\x09var\x20cl\x20=\x20'system';\x0a\x09\x09if\x20(write.Kind\x20==\x20'stdout'\x20||\x20write.Kind\x20==\x20'stderr')\x0a\x09\x09\x09cl\x20=\x20write.Kind;\x0a\x0a\x09\x09var\x20m\x20=\x20write.Body;\x0a\x09\x09if\x20(write.Kind\x20==\x20'end')\x20{\x0a\x09\x09\x09m\x20=\x20'\\nProgram\x20exited'\x20+\x20(m?(':\x20'+m):'.');\x0a\x09\x09}\x0a\x0a\x09\x09if\x20(m.indexOf('IMAGE:')\x20===\x200)\x20{\x0a\x09\x09\x09//\x20TODO(adg):\x20buffer\x20all\x20writes\x20before\x20creating\x20image\x0a\x09\x09\x09var\x20url\x20=\x20'data:image/png;base64,'\x20+\x20m.substr(6);\x0a\x09\x09\x09var\x20img\x20=\x20document.createElement('img');\x0a\x09\x09\x09img.src\x20=\x20url;\x0a\x09\x09\x09el.appendChild(img);\x0a\x09\x09\x09return;\x0a\x09\x09}\x0a\x0a\x09\x09//\x20^L\x20clears\x20the\x20screen.\x0a\x09\x09var\x20s\x20=\x20m.split('\\x0c');\x0a\x09\x09if\x20(s.length\x20>\x201)\x20{\x0a\x09\x09\x09el.innerHTML\x20=\x20'';\x0a\x09\x09\x09m\x20=\x20s.pop();\x0a\x09\x09}\x0a\x0a\x09\x09m\x20=\x20m.replace(/&/g,\x20'&');\x0a\x09\x09m\x20=\x20m.replace(//g,\x20'>');\x0a\x0a\x09\x09var\x20needScroll\x20=\x20(el.scrollTop\x20+\x20el.offsetHeight)\x20==\x20el.scrollHeight;\x0a\x0a\x09\x09var\x20span\x20=\x20document.createElement('span');\x0a\x09\x09span.className\x20=\x20cl;\x0a\x09\x09span.innerHTML\x20=\x20m;\x0a\x09\x09el.appendChild(span);\x0a\x0a\x09\x09if\x20(needScroll)\x0a\x09\x09\x09el.scrollTop\x20=\x20el.scrollHeight\x20-\x20el.offsetHeight;\x0a\x09};\x0a}\x0a\x0a(function()\x20{\x0a\x20\x20function\x20lineHighlight(error)\x20{\x0a\x20\x20\x20\x20var\x20regex\x20=\x20/prog.go:([0-9]+)/g;\x0a\x20\x20\x20\x20var\x20r\x20=\x20regex.exec(error);\x0a\x20\x20\x20\x20while\x20(r)\x20{\x0a\x20\x20\x20\x20\x20\x20$(\".lines\x20div\").eq(r[1]-1).addClass(\"lineerror\");\x0a\x20\x20\x20\x20\x20\x20r\x20=\x20regex.exec(error);\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20function\x20highlightOutput(wrappedOutput)\x20{\x0a\x20\x20\x20\x20return\x20function(write)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(write.Body)\x20lineHighlight(write.Body);\x0a\x20\x20\x20\x20\x20\x20wrappedOutput(write);\x0a\x20\x20\x20\x20};\x0a\x20\x20}\x0a\x20\x20function\x20lineClear()\x20{\x0a\x20\x20\x20\x20$(\".lineerror\").removeClass(\"lineerror\");\x0a\x20\x20}\x0a\x0a\x20\x20//\x20opts\x20is\x20an\x20object\x20with\x20these\x20keys\x0a\x20\x20//\x20\x20codeEl\x20-\x20code\x20editor\x20element\x0a\x20\x20//\x20\x20outputEl\x20-\x20program\x20output\x20element\x0a\x20\x20//\x20\x20runEl\x20-\x20run\x20button\x20element\x0a\x20\x20//\x20\x20fmtEl\x20-\x20fmt\x20button\x20element\x20(optional)\x0a\x20\x20//\x20\x20fmtImportEl\x20-\x20fmt\x20\"imports\"\x20checkbox\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareEl\x20-\x20share\x20button\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareURLEl\x20-\x20share\x20URL\x20text\x20input\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareRedirect\x20-\x20base\x20URL\x20to\x20redirect\x20to\x20on\x20share\x20(optional)\x0a\x20\x20//\x20\x20toysEl\x20-\x20toys\x20select\x20element\x20(optional)\x0a\x20\x20//\x20\x20enableHistory\x20-\x20enable\x20using\x20HTML5\x20history\x20API\x20(optional)\x0a\x20\x20//\x20\x20transport\x20-\x20playground\x20transport\x20to\x20use\x20(default\x20is\x20HTTPTransport)\x0a\x20\x20//\x20\x20enableShortcuts\x20-\x20whether\x20to\x20enable\x20shortcuts\x20(Ctrl+S/Cmd+S\x20to\x20save)\x20(default\x20is\x20false)\x0a\x20\x20//\x20\x20enableVet\x20-\x20enable\x20running\x20vet\x20and\x20displaying\x20its\x20errors\x0a\x20\x20function\x20playground(opts)\x20{\x0a\x20\x20\x20\x20var\x20code\x20=\x20$(opts.codeEl);\x0a\x20\x20\x20\x20var\x20transport\x20=\x20opts['transport']\x20||\x20new\x20HTTPTransport(opts['enableVet']);\x0a\x20\x20\x20\x20var\x20running;\x0a\x0a\x20\x20\x20\x20//\x20autoindent\x20helpers.\x0a\x20\x20\x20\x20function\x20insertTabs(n)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20find\x20the\x20selection\x20start\x20and\x20end\x0a\x20\x20\x20\x20\x20\x20var\x20start\x20=\x20code[0].selectionStart;\x0a\x20\x20\x20\x20\x20\x20var\x20end\x20\x20\x20=\x20code[0].selectionEnd;\x0a\x20\x20\x20\x20\x20\x20//\x20split\x20the\x20textarea\x20content\x20into\x20two,\x20and\x20insert\x20n\x20tabs\x0a\x20\x20\x20\x20\x20\x20var\x20v\x20=\x20code[0].value;\x0a\x20\x20\x20\x20\x20\x20var\x20u\x20=\x20v.substr(0,\x20start);\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20i=0;\x20i\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20curpos--;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(el.value[curpos]\x20==\x20\"\\t\")\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tabs++;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(tabs\x20>\x200\x20||\x20el.value[curpos]\x20==\x20\"\\n\")\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20break;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20setTimeout(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20insertTabs(tabs);\x0a\x20\x20\x20\x20\x20\x20},\x201);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20//\x20NOTE(cbro):\x20e\x20is\x20a\x20jQuery\x20event,\x20not\x20a\x20DOM\x20event.\x0a\x20\x20\x20\x20function\x20handleSaveShortcut(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(e.isDefaultPrevented())\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20if\x20(!e.metaKey\x20&&\x20!e.ctrlKey)\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20if\x20(e.key\x20!=\x20\"S\"\x20&&\x20e.key\x20!=\x20\"s\")\x20return\x20false;\x0a\x0a\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Share\x20and\x20save\x0a\x20\x20\x20\x20\x20\x20share(function(url)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.location.href\x20=\x20url\x20+\x20\".go?download=true\";\x0a\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20return\x20true;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20keyHandler(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opts.enableShortcuts\x20&&\x20handleSaveShortcut(e))\x20return;\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(e.keyCode\x20==\x209\x20&&\x20!e.ctrlKey)\x20{\x20//\x20tab\x20(but\x20not\x20ctrl-tab)\x0a\x20\x20\x20\x20\x20\x20\x20\x20insertTabs(1);\x0a\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(e.keyCode\x20==\x2013)\x20{\x20//\x20enter\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(e.shiftKey)\x20{\x20//\x20+shift\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20run();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20if\x20(e.ctrlKey)\x20{\x20//\x20+control\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fmt();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoindent(e.target);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20return\x20true;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20code.unbind('keydown').bind('keydown',\x20keyHandler);\x0a\x20\x20\x20\x20var\x20outdiv\x20=\x20$(opts.outputEl).empty();\x0a\x20\x20\x20\x20var\x20output\x20=\x20$('
            ').appendTo(outdiv);\x0a\x0a\x20\x20\x20\x20function\x20body()\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20$(opts.codeEl).val();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20setBody(text)\x20{\x0a\x20\x20\x20\x20\x20\x20$(opts.codeEl).val(text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20origin(href)\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20(\"\"+href).split(\"/\").slice(0,\x203).join(\"/\");\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20pushedEmpty\x20=\x20(window.location.pathname\x20==\x20\"/\");\x0a\x20\x20\x20\x20function\x20inputChanged()\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(pushedEmpty)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20pushedEmpty\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20$(opts.shareURLEl).hide();\x0a\x20\x20\x20\x20\x20\x20window.history.pushState(null,\x20\"\",\x20\"/\");\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20popState(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(e\x20===\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(e\x20&&\x20e.state\x20&&\x20e.state.code)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20setBody(e.state.code);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20rewriteHistory\x20=\x20false;\x0a\x20\x20\x20\x20if\x20(window.history\x20&&\x20window.history.pushState\x20&&\x20window.addEventListener\x20&&\x20opts.enableHistory)\x20{\x0a\x20\x20\x20\x20\x20\x20rewriteHistory\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20code[0].addEventListener('input',\x20inputChanged);\x0a\x20\x20\x20\x20\x20\x20window.addEventListener('popstate',\x20popState);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20setError(error)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20lineClear();\x0a\x20\x20\x20\x20\x20\x20lineHighlight(error);\x0a\x20\x20\x20\x20\x20\x20output.empty().addClass(\"error\").text(error);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20loading()\x20{\x0a\x20\x20\x20\x20\x20\x20lineClear();\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20output.removeClass(\"error\").text('Waiting\x20for\x20remote\x20server...');\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20run()\x20{\x0a\x20\x20\x20\x20\x20\x20loading();\x0a\x20\x20\x20\x20\x20\x20running\x20=\x20transport.Run(body(),\x20highlightOutput(PlaygroundOutput(output[0])));\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20fmt()\x20{\x0a\x20\x20\x20\x20\x20\x20loading();\x0a\x20\x20\x20\x20\x20\x20var\x20data\x20=\x20{\"body\":\x20body()};\x0a\x20\x20\x20\x20\x20\x20if\x20($(opts.fmtImportEl).is(\":checked\"))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20data[\"imports\"]\x20=\x20\"true\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20$.ajax(\"/fmt\",\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20data:\x20data,\x0a\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\"POST\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20dataType:\x20\"json\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20success:\x20function(data)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(data.Error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setError(data.Error);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setBody(data.Body);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setError(\"\");\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20shareURL;\x20//\x20jQuery\x20element\x20to\x20show\x20the\x20shared\x20URL.\x0a\x20\x20\x20\x20var\x20sharing\x20=\x20false;\x20//\x20true\x20if\x20there\x20is\x20a\x20pending\x20request.\x0a\x20\x20\x20\x20var\x20shareCallbacks\x20=\x20[];\x0a\x20\x20\x20\x20function\x20share(opt_callback)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opt_callback)\x20shareCallbacks.push(opt_callback);\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(sharing)\x20return;\x0a\x20\x20\x20\x20\x20\x20sharing\x20=\x20true;\x0a\x0a\x20\x20\x20\x20\x20\x20var\x20sharingData\x20=\x20body();\x0a\x20\x20\x20\x20\x20\x20$.ajax(\"/share\",\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20processData:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20data:\x20sharingData,\x0a\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\"POST\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20contentType:\x20\"text/plain;\x20charset=utf-8\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20complete:\x20function(xhr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sharing\x20=\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(xhr.status\x20!=\x20200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20alert(\"Server\x20error;\x20try\x20again.\");\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(opts.shareRedirect)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.location\x20=\x20opts.shareRedirect\x20+\x20xhr.responseText;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20path\x20=\x20\"/p/\"\x20+\x20xhr.responseText;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20url\x20=\x20origin(window.location)\x20+\x20path;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20shareCallbacks.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareCallbacks[i](url);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareCallbacks\x20=\x20[];\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(shareURL)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareURL.show().val(url).focus().select();\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(rewriteHistory)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20historyData\x20=\x20{\"code\":\x20sharingData};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.history.pushState(historyData,\x20\"\",\x20path);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20pushedEmpty\x20=\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20$(opts.runEl).click(run);\x0a\x20\x20\x20\x20$(opts.fmtEl).click(fmt);\x0a\x0a\x20\x20\x20\x20if\x20(opts.shareEl\x20!==\x20null\x20&&\x20(opts.shareURLEl\x20!==\x20null\x20||\x20opts.shareRedirect\x20!==\x20null))\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opts.shareURLEl)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20shareURL\x20=\x20$(opts.shareURLEl).hide();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20$(opts.shareEl).click(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20share();\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(opts.toysEl\x20!==\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20$(opts.toysEl).bind('change',\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20toy\x20=\x20$(this).val();\x0a\x20\x20\x20\x20\x20\x20\x20\x20$.ajax(\"/doc/play/\"+toy,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processData:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\"GET\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20complete:\x20function(xhr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(xhr.status\x20!=\x20200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20alert(\"Server\x20error;\x20try\x20again.\");\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setBody(xhr.responseText);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x0a\x20\x20window.playground\x20=\x20playground;\x0a})();\x0a",
             
            -	"search.html": "\x0a{{with\x20.Alert}}\x0a\x09

            \x0a\x09{{html\x20.}}\x0a\x09

            \x0a{{end}}\x0a{{with\x20.Alt}}\x0a\x09

            \x0a\x09Did\x20you\x20mean:\x20\x0a\x09{{range\x20.Alts}}\x0a\x09\x09{{html\x20.}}\x0a\x09{{end}}\x0a\x09

            \x0a{{end}}\x0a", + "search.html": "\x0a\x0a{{\x20$colCount\x20:=\x20tocColCount\x20.}}\x0a{{/*\x20Generate\x20the\x20TOC\x20*/}}\x0a\x0a{{range\x20$key,\x20$val\x20:=\x20.Idents}}\x0a\x09{{if\x20$val}}\x0a\x09\x09{{$key.Name}}\x0a\x09\x09\x0a\x09{{end}}\x0a{{end}}\x0a\x0a{{if\x20not\x20.Idents}}\x0a\x09{{with\x20.Pak}}\x0a\x09\x09Package\x20{{html\x20$.Query}}\x0a\x09\x09\x0a\x09{{end}}\x0a{{end}}\x0a\x0a{{with\x20.Hit}}\x0a\x09{{with\x20.Decls}}\x0a\x09\x09Package-level\x20declarations\x0a\x09\x09\x0a\x09\x09{{range\x20.}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Pak.Path\x20|\x20html}}\x0a\x09\x09\x09package\x20{{html\x20.Pak.Name}}\x0a\x09\x09\x09\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a\x09{{with\x20.Others}}\x0a\x09\x09Local\x20declarations\x20and\x20uses\x0a\x09\x09\x0a\x09\x09{{range\x20.}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Pak.Path\x20|\x20html}}\x0a\x09\x09\x09package\x20{{html\x20.Pak.Name}}\x0a\x09\x09\x09\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a{{end}}\x0a\x0a{{with\x20.Textual}}\x0a\x09{{if\x20$.Complete}}\x0a\x09\x09{{html\x20$.Found}}\x20textual\x20occurrences\x0a\x09{{else}}\x0a\x09\x09More\x20than\x20{{html\x20$.Found}}\x20textual\x20occurrences\x0a\x09{{end}}\x0a{{end}}\x0a\x0a\x0a{{with\x20.Alert}}\x0a\x09

            \x0a\x09{{html\x20.}}\x0a\x09

            \x0a{{end}}\x0a{{with\x20.Alt}}\x0a\x09

            \x0a\x09Did\x20you\x20mean:\x20\x0a\x09{{range\x20.Alts}}\x0a\x09\x09{{html\x20.}}\x0a\x09{{end}}\x0a\x09

            \x0a{{end}}\x0a", "searchcode.html": "\x0a{{$query_url\x20:=\x20urlquery\x20.Query}}\x0a{{if\x20not\x20.Idents}}\x0a\x09{{with\x20.Pak}}\x0a\x09\x09Package\x20{{html\x20$.Query}}\x0a\x09\x09

            \x0a\x09\x09\x0a\x09\x09{{range\x20.}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Pak.Path\x20|\x20html}}\x0a\x09\x09\x09{{$pkg_html}}\x0a\x09\x09{{end}}\x0a\x09\x09\x0a\x09\x09

            \x0a\x09{{end}}\x0a{{end}}\x0a{{with\x20.Hit}}\x0a\x09{{with\x20.Decls}}\x0a\x09\x09Package-level\x20declarations\x0a\x09\x09{{range\x20.}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Pak.Path\x20|\x20html}}\x0a\x09\x09\x09package\x20{{html\x20.Pak.Name}}\x0a\x09\x09\x09{{range\x20.Files}}\x0a\x09\x09\x09\x09{{$file\x20:=\x20.File.Path}}\x0a\x09\x09\x09\x09{{range\x20.Groups}}\x0a\x09\x09\x09\x09\x09{{range\x20.}}\x0a\x09\x09\x09\x09\x09\x09{{$line\x20:=\x20infoLine\x20.}}\x0a\x09\x09\x09\x09\x09\x09{{$file}}:{{$line}}\x0a\x09\x09\x09\x09\x09\x09{{infoSnippet_html\x20.}}\x0a\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09{{end}}\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a\x09{{with\x20.Others}}\x0a\x09\x09Local\x20declarations\x20and\x20uses\x0a\x09\x09{{range\x20.}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Pak.Path\x20|\x20html}}\x0a\x09\x09\x09package\x20{{html\x20.Pak.Name}}\x0a\x09\x09\x09{{range\x20.Files}}\x0a\x09\x09\x09\x09{{$file\x20:=\x20.File.Path}}\x0a\x09\x09\x09\x09{{$file}}\x0a\x09\x09\x09\x09\x0a\x09\x09\x09\x09{{range\x20.Groups}}\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09{{index\x20.\x200\x20|\x20infoKind_html}}\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09{{range\x20.}}\x0a\x09\x09\x09\x09\x09\x09{{$line\x20:=\x20infoLine\x20.}}\x0a\x09\x09\x09\x09\x09\x09{{$line}}\x0a\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x0a\x09\x09\x09{{end}}\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a{{end}}\x0a", @@ -101,5 +101,5 @@ var Files = map[string]string{ "searchtxt.html": "\x0a{{$query_url\x20:=\x20urlquery\x20.Query}}\x0a{{with\x20.Textual}}\x0a\x09{{if\x20$.Complete}}\x0a\x09\x09{{html\x20$.Found}}\x20textual\x20occurrences\x0a\x09{{else}}\x0a\x09\x09More\x20than\x20{{html\x20$.Found}}\x20textual\x20occurrences\x0a\x09\x09

            \x0a\x09\x09Not\x20all\x20files\x20or\x20lines\x20containing\x20\"{{html\x20$.Query}}\"\x20are\x20shown.\x0a\x09\x09

            \x0a\x09{{end}}\x0a\x09

            \x0a\x09\x0a\x09{{range\x20.}}\x0a\x09\x09{{$file\x20:=\x20.Filename}}\x0a\x09\x09\x0a\x09\x09\x0a\x09\x09{{$file}}:\x0a\x09\x09\x0a\x09\x09\x0a\x09\x09{{len\x20.Lines}}\x0a\x09\x09\x0a\x09\x09\x0a\x09\x09{{range\x20.Lines}}\x0a\x09\x09\x09{{html\x20.}}\x0a\x09\x09{{end}}\x0a\x09\x09{{if\x20not\x20$.Complete}}\x0a\x09\x09\x09...\x0a\x09\x09{{end}}\x0a\x09\x09\x0a\x09\x09\x0a\x09{{end}}\x0a\x09{{if\x20not\x20$.Complete}}\x0a\x09\x09...\x0a\x09{{end}}\x0a\x09\x0a\x09

            \x0a{{end}}\x0a", - "style.css": "body\x20{\x0a\x09margin:\x200;\x0a\x09font-family:\x20Arial,\x20sans-serif;\x0a\x09background-color:\x20#fff;\x0a\x09line-height:\x201.3;\x0a\x09text-align:\x20center;\x0a\x09color:\x20#222;\x0a}\x0apre,\x0acode\x20{\x0a\x09font-family:\x20Menlo,\x20monospace;\x0a\x09font-size:\x200.875rem;\x0a}\x0apre\x20{\x0a\x09line-height:\x201.4;\x0a\x09overflow-x:\x20auto;\x0a}\x0apre\x20.comment\x20{\x0a\x09color:\x20#006600;\x0a}\x0apre\x20.highlight,\x0apre\x20.highlight-comment,\x0apre\x20.selection-highlight,\x0apre\x20.selection-highlight-comment\x20{\x0a\x09background:\x20#FFFF00;\x0a}\x0apre\x20.selection,\x0apre\x20.selection-comment\x20{\x0a\x09background:\x20#FF9632;\x0a}\x0apre\x20.ln\x20{\x0a\x09color:\x20#999;\x0a\x09background:\x20#efefef;\x0a}\x0a.ln\x20{\x0a\x09-webkit-user-select:\x20none;\x0a\x09-moz-user-select:\x20none;\x0a\x09-ms-user-select:\x20none;\x0a\x09user-select:\x20none;\x0a\x0a\x09/*\x20Ensure\x208\x20characters\x20in\x20the\x20document\x20-\x20which\x20due\x20to\x20floating\x0a\x20\x20\x20*\x20point\x20rendering\x20issues,\x20might\x20have\x20a\x20width\x20of\x20less\x20than\x201\x20each\x20-\x20are\x208\x0a\x20\x20\x20*\x20characters\x20wide,\x20so\x20a\x20tab\x20in\x20the\x209th\x20position\x20indents\x20properly.\x20See\x0a\x20\x20\x20*\x20https://github.com/webcompat/web-bugs/issues/17530#issuecomment-402675091\x0a\x20\x20\x20*\x20for\x20more\x20information.\x20*/\x0a\x09display:\x20inline-block;\x0a\x09width:\x208ch;\x0a}\x0a\x0aa,\x0a.exampleHeading\x20.text,\x0a.expandAll\x20{\x0a\x09color:\x20#375EAB;\x0a\x09text-decoration:\x20none;\x0a}\x0aa:hover,\x0a.exampleHeading\x20.text:hover,\x0a.expandAll:hover\x20{\x0a\x09text-decoration:\x20underline;\x0a}\x0a.article\x20a\x20{\x0a\x09text-decoration:\x20underline;\x0a}\x0a.article\x20.title\x20a\x20{\x0a\x09text-decoration:\x20none;\x0a}\x0a\x0a.permalink\x20{\x0a\x09display:\x20none;\x0a}\x0a:hover\x20>\x20.permalink\x20{\x0a\x09display:\x20inline;\x0a}\x0a\x0ap,\x20li\x20{\x0a\x09max-width:\x2050rem;\x0a\x09word-wrap:\x20break-word;\x0a}\x0ap,\x0apre,\x0aul,\x0aol\x20{\x0a\x09margin:\x201.25rem;\x0a}\x0apre\x20{\x0a\x09background:\x20#EFEFEF;\x0a\x09padding:\x200.625rem;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0a\x0ah1,\x0ah2,\x0ah3,\x0ah4,\x0a.rootHeading\x20{\x0a\x09margin:\x201.25rem\x200\x201.25rem;\x0a\x09padding:\x200;\x0a\x09color:\x20#375EAB;\x0a\x09font-weight:\x20bold;\x0a}\x0ah1\x20{\x0a\x09font-size:\x201.75rem;\x0a\x09line-height:\x201;\x0a}\x0ah1\x20.text-muted\x20{\x0a\x09color:#777;\x0a}\x0ah2\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09background:\x20#E0EBF5;\x0a\x09padding:\x200.5rem;\x0a\x09line-height:\x201.25;\x0a\x09font-weight:\x20normal;\x0a\x09overflow:\x20auto;\x0a\x09overflow-wrap:\x20break-word;\x0a}\x0ah2\x20a\x20{\x0a\x09font-weight:\x20bold;\x0a}\x0ah3\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09line-height:\x201.25;\x0a\x09overflow:\x20auto;\x0a\x09overflow-wrap:\x20break-word;\x0a}\x0ah3,\x0ah4\x20{\x0a\x09margin:\x201.25rem\x200.3125rem;\x0a}\x0ah4\x20{\x0a\x09font-size:\x201rem;\x0a}\x0a.rootHeading\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09margin:\x200;\x0a}\x0a\x0ah2\x20>\x20span,\x0ah3\x20>\x20span\x20{\x0a\x09float:\x20right;\x0a\x09margin:\x200\x2025px\x200\x200;\x0a\x09font-weight:\x20normal;\x0a\x09color:\x20#5279C7;\x0a}\x0a\x0adl\x20{\x0a\x09margin:\x201.25rem;\x0a}\x0add\x20{\x0a\x09margin:\x200\x200\x200\x201.25rem;\x0a}\x0adl,\x0add\x20{\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv#nav\x20table\x20td\x20{\x0a\x09vertical-align:\x20top;\x0a}\x0a\x0a#pkg-index\x20h3\x20{\x0a\x09font-size:\x201rem;\x0a}\x0a.pkg-dir\x20{\x0a\x09padding:\x200\x200.625rem;\x0a}\x0a.pkg-dir\x20table\x20{\x0a\x09border-collapse:\x20collapse;\x0a\x09border-spacing:\x200;\x0a}\x0a.pkg-name\x20{\x0a\x09padding-right:\x200.625rem;\x0a}\x0a.alert\x20{\x0a\x09color:\x20#AA0000;\x0a}\x0a\x0a.top-heading\x20{\x0a\x09float:\x20left;\x0a\x09padding:\x201.313rem\x200;\x0a\x09font-size:\x201.25rem;\x0a\x09font-weight:\x20normal;\x0a}\x0a.top-heading\x20a\x20{\x0a\x09color:\x20#222;\x0a\x09text-decoration:\x20none;\x0a}\x0a\x0a#pkg-examples\x20h3\x20{\x0a\x09float:\x20left;\x0a}\x0a\x0a#pkg-examples\x20dl\x20{\x0a\x09clear:\x20both;\x0a}\x0a\x0a.expandAll\x20{\x0a\x09cursor:\x20pointer;\x0a\x09float:\x20left;\x0a\x09margin:\x201.25rem\x200;\x0a}\x0a\x0adiv#topbar\x20{\x0a\x09background:\x20#E0EBF5;\x0a\x09height:\x204rem;\x0a\x09overflow:\x20hidden;\x0a}\x0a\x0adiv#page\x20{\x0a\x09width:\x20100%;\x0a}\x0adiv#page\x20>\x20.container,\x0adiv#topbar\x20>\x20.container\x20{\x0a\x09text-align:\x20left;\x0a\x09margin-left:\x20auto;\x0a\x09margin-right:\x20auto;\x0a\x09padding:\x200\x201.25rem;\x0a}\x0adiv#topbar\x20>\x20.container,\x0adiv#page\x20>\x20.container\x20{\x0a\x09max-width:\x2059.38rem;\x0a}\x0adiv#page.wide\x20>\x20.container,\x0adiv#topbar.wide\x20>\x20.container\x20{\x0a\x09max-width:\x20none;\x0a}\x0adiv#plusone\x20{\x0a\x09float:\x20right;\x0a\x09clear:\x20right;\x0a\x09margin-top:\x200.3125rem;\x0a}\x0a\x0adiv#footer\x20{\x0a\x09text-align:\x20center;\x0a\x09color:\x20#666;\x0a\x09font-size:\x200.875rem;\x0a\x09margin:\x202.5rem\x200;\x0a}\x0a\x0adiv#menu\x20>\x20a,\x0ainput#search,\x0adiv#learn\x20.buttons\x20a,\x0adiv.play\x20.buttons\x20a,\x0adiv#blog\x20.read\x20a,\x0a#menu-button\x20{\x0a\x09padding:\x200.625rem;\x0a\x0a\x09text-decoration:\x20none;\x0a\x09font-size:\x201rem;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0adiv#playground\x20.buttons\x20a,\x0adiv#menu\x20>\x20a,\x0ainput#search,\x0a#menu-button\x20{\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a}\x0adiv#playground\x20.buttons\x20a,\x0adiv#menu\x20>\x20a,\x0a#menu-button\x20{\x0a\x09color:\x20white;\x0a\x09background:\x20#375EAB;\x0a}\x0a#playgroundButton.active\x20{\x0a\x09background:\x20white;\x0a\x09color:\x20#375EAB;\x0a}\x0aa#start,\x0adiv#learn\x20.buttons\x20a,\x0adiv.play\x20.buttons\x20a,\x0adiv#blog\x20.read\x20a\x20{\x0a\x09color:\x20#222;\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a\x09background:\x20#E0EBF5;\x0a}\x0a.download\x20{\x0a\x09width:\x209.375rem;\x0a}\x0a\x0adiv#menu\x20{\x0a\x09text-align:\x20right;\x0a\x09padding:\x200.625rem;\x0a\x09white-space:\x20nowrap;\x0a\x09max-height:\x200;\x0a\x09-moz-transition:\x20max-height\x20.25s\x20linear;\x0a\x09transition:\x20max-height\x20.25s\x20linear;\x0a\x09width:\x20100%;\x0a}\x0adiv#menu.menu-visible\x20{\x0a\x09max-height:\x2031.25rem;\x0a}\x0adiv#menu\x20>\x20a,\x0a#menu-button\x20{\x0a\x09margin:\x200.625rem\x200.125rem;\x0a\x09padding:\x200.625rem;\x0a}\x0a::-webkit-input-placeholder\x20{\x0a\x09color:\x20#7f7f7f;\x0a\x09opacity:\x201;\x0a}\x0a::placeholder\x20{\x0a\x09color:\x20#7f7f7f;\x0a\x09opacity:\x201;\x0a}\x0a#menu\x20.search-box\x20{\x0a\x09display:\x20inline-flex;\x0a\x09width:\x208.75rem;\x0a}\x0ainput#search\x20{\x0a\x09background:\x20white;\x0a\x09color:\x20#222;\x0a\x09box-sizing:\x20border-box;\x0a\x09-webkit-appearance:\x20none;\x0a\x09border-top-right-radius:\x200;\x0a\x09border-bottom-right-radius:\x200;\x0a\x09border-right:\x200;\x0a\x09margin-right:\x200;\x0a\x09flex-grow:\x201;\x0a\x09max-width:\x20100%;\x0a\x09min-width:\x205.625rem;\x0a}\x0ainput#search:-webkit-search-decoration\x20{\x0a\x09-webkit-appearance:\x20none;\x0a}\x0ainput#search:-moz-ui-invalid\x20{\x0a\x09box-shadow:\x20unset;\x0a}\x0ainput#search\x20+\x20button\x20{\x0a\x09display:\x20inline;\x0a\x09font-size:\x201em;\x0a\x09background-color:\x20#375EAB;\x0a\x09color:\x20white;\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a\x09border-top-left-radius:\x200;\x0a\x09border-top-right-radius:\x200.3125rem;\x0a\x09border-bottom-left-radius:\x200;\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a\x09margin-left:\x200;\x0a\x09cursor:\x20pointer;\x0a}\x0ainput#search\x20+\x20button\x20span\x20{\x0a\x09display:\x20flex;\x0a}\x0ainput#search\x20+\x20button\x20svg\x20{\x0a\x09fill:\x20white\x0a}\x0a\x0a#menu-button\x20{\x0a\x09display:\x20none;\x0a\x09position:\x20absolute;\x0a\x09right:\x200.3125rem;\x0a\x09top:\x200;\x0a\x09margin-right:\x200.3125rem;\x0a}\x0a#menu-button-arrow\x20{\x0a\x09display:\x20inline-block;\x0a}\x0a.vertical-flip\x20{\x0a\x09transform:\x20rotate(-180deg);\x0a}\x0a\x0adiv.left\x20{\x0a\x09float:\x20left;\x0a\x09clear:\x20left;\x0a\x09margin-right:\x202.5%;\x0a}\x0adiv.right\x20{\x0a\x09float:\x20right;\x0a\x09clear:\x20right;\x0a\x09margin-left:\x202.5%;\x0a}\x0adiv.left,\x0adiv.right\x20{\x0a\x09width:\x2045%;\x0a}\x0a\x0adiv#learn,\x0adiv#about\x20{\x0a\x09padding-top:\x201.25rem;\x0a}\x0adiv#learn\x20h2,\x0adiv#about\x20{\x0a\x09margin:\x200;\x0a}\x0adiv#about\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09margin:\x200\x20auto\x201.875rem;\x0a}\x0adiv#gopher\x20{\x0a\x09background:\x20url(/doc/gopher/frontpage.png)\x20no-repeat;\x0a\x09background-position:\x20center\x20top;\x0a\x09height:\x209.688rem;\x0a\x09max-height:\x20200px;\x20/*\x20Setting\x20in\x20px\x20to\x20prevent\x20the\x20gopher\x20from\x20blowing\x20up\x20in\x20very\x20high\x20default\x20font-sizes\x20*/\x0a}\x0aa#start\x20{\x0a\x09display:\x20block;\x0a\x09padding:\x200.625rem;\x0a\x0a\x09text-align:\x20center;\x0a\x09text-decoration:\x20none;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0aa#start\x20.big\x20{\x0a\x09display:\x20block;\x0a\x09font-weight:\x20bold;\x0a\x09font-size:\x201.25rem;\x0a}\x0aa#start\x20.desc\x20{\x0a\x09display:\x20block;\x0a\x09font-size:\x200.875rem;\x0a\x09font-weight:\x20normal;\x0a\x09margin-top:\x200.3125rem;\x0a}\x0a\x0adiv#learn\x20.popout\x20{\x0a\x09float:\x20right;\x0a\x09display:\x20block;\x0a\x09cursor:\x20pointer;\x0a\x09font-size:\x200.75rem;\x0a\x09background:\x20url(/doc/share.png)\x20no-repeat;\x0a\x09background-position:\x20right\x20center;\x0a\x09padding:\x200.375rem\x201.688rem;\x0a}\x0adiv#learn\x20pre,\x0adiv#learn\x20textarea\x20{\x0a\x09padding:\x200;\x0a\x09margin:\x200;\x0a\x09font-family:\x20Menlo,\x20monospace;\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv#learn\x20.input\x20{\x0a\x09padding:\x200.625rem;\x0a\x09margin-top:\x200.625rem;\x0a\x09height:\x209.375rem;\x0a\x0a\x09border-top-left-radius:\x200.3125rem;\x0a\x09border-top-right-radius:\x200.3125rem;\x0a}\x0adiv#learn\x20.input\x20textarea\x20{\x0a\x09width:\x20100%;\x0a\x09height:\x20100%;\x0a\x09border:\x20none;\x0a\x09outline:\x20none;\x0a\x09resize:\x20none;\x0a}\x0adiv#learn\x20.output\x20{\x0a\x09border-top:\x20none\x20!important;\x0a\x0a\x09padding:\x200.625rem;\x0a\x09height:\x203.688rem;\x0a\x09overflow:\x20auto;\x0a\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a\x09border-bottom-left-radius:\x200.3125rem;\x0a}\x0adiv#learn\x20.output\x20pre\x20{\x0a\x09padding:\x200;\x0a\x09border-radius:\x200;\x0a}\x0adiv#learn\x20.input,\x0adiv#learn\x20.input\x20textarea,\x0adiv#learn\x20.output,\x0adiv#learn\x20.output\x20pre\x20{\x0a\x09background:\x20#FFFFD8;\x0a}\x0adiv#learn\x20.input,\x0adiv#learn\x20.output\x20{\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a}\x0adiv#learn\x20.buttons\x20{\x0a\x09float:\x20right;\x0a\x09padding:\x201.25rem\x200\x200.625rem\x200;\x0a\x09text-align:\x20right;\x0a}\x0adiv#learn\x20.buttons\x20a\x20{\x0a\x09height:\x201rem;\x0a\x09margin-left:\x200.3125rem;\x0a\x09padding:\x200.625rem;\x0a}\x0adiv#learn\x20.toys\x20{\x0a\x09margin-top:\x200.5rem;\x0a}\x0adiv#learn\x20.toys\x20select\x20{\x0a\x09font-size:\x200.875rem;\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a\x09margin:\x200;\x0a}\x0adiv#learn\x20.output\x20.exit\x20{\x0a\x09display:\x20none;\x0a}\x0a\x0adiv#video\x20{\x0a\x09max-width:\x20100%;\x0a}\x0adiv#blog,\x0adiv#video\x20{\x0a\x09margin-top:\x202.5rem;\x0a}\x0adiv#blog\x20>\x20a,\x0adiv#blog\x20>\x20div,\x0adiv#blog\x20>\x20h2,\x0adiv#video\x20>\x20a,\x0adiv#video\x20>\x20div,\x0adiv#video\x20>\x20h2\x20{\x0a\x09margin-bottom:\x200.625rem;\x0a}\x0adiv#blog\x20.title,\x0adiv#video\x20.title\x20{\x0a\x09display:\x20block;\x0a\x09font-size:\x201.25rem;\x0a}\x0adiv#blog\x20.when\x20{\x0a\x09color:\x20#666;\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv#blog\x20.read\x20{\x0a\x09text-align:\x20right;\x0a}\x0a\x0a@supports\x20(--c:\x200)\x20{\x0a\x09[style*=\"--aspect-ratio-padding:\"]\x20{\x0a\x09\x09position:\x20relative;\x0a\x09\x09overflow:\x20hidden;\x0a\x09\x09padding-top:\x20var(--aspect-ratio-padding);\x0a\x09}\x0a\x0a\x09[style*=\"--aspect-ratio-padding:\"]>*\x20{\x0a\x09\x09position:\x20absolute;\x0a\x09\x09top:\x200;\x0a\x09\x09left:\x200;\x0a\x09\x09width:\x20100%;\x0a\x09\x09height:\x20100%;\x0a\x09}\x0a}\x0a\x0a.toggleButton\x20{\x20cursor:\x20pointer;\x20}\x0a.toggle\x20>\x20.collapsed\x20{\x20display:\x20block;\x20}\x0a.toggle\x20>\x20.expanded\x20{\x20display:\x20none;\x20}\x0a.toggleVisible\x20>\x20.collapsed\x20{\x20display:\x20none;\x20}\x0a.toggleVisible\x20>\x20.expanded\x20{\x20display:\x20block;\x20}\x0a\x0atable.codetable\x20{\x20margin-left:\x20auto;\x20margin-right:\x20auto;\x20border-style:\x20none;\x20}\x0atable.codetable\x20td\x20{\x20padding-right:\x200.625rem;\x20}\x0ahr\x20{\x20border-style:\x20none;\x20border-top:\x200.0625rem\x20solid\x20black;\x20}\x0a\x0aimg.gopher\x20{\x0a\x09float:\x20right;\x0a\x09margin-left:\x200.625rem;\x0a\x09margin-bottom:\x200.625rem;\x0a\x09z-index:\x20-1;\x0a}\x0ah2\x20{\x20clear:\x20right;\x20}\x0a\x0a/*\x20example\x20and\x20drop-down\x20playground\x20*/\x0adiv.play\x20{\x0a\x09padding:\x200\x201.25rem\x202.5rem\x201.25rem;\x0a}\x0adiv.play\x20pre,\x0adiv.play\x20textarea,\x0adiv.play\x20.lines\x20{\x0a\x09padding:\x200;\x0a\x09margin:\x200;\x0a\x09font-family:\x20Menlo,\x20monospace;\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv.play\x20.input\x20{\x0a\x09padding:\x200.625rem;\x0a\x09margin-top:\x200.625rem;\x0a\x0a\x09border-top-left-radius:\x200.3125rem;\x0a\x09border-top-right-radius:\x200.3125rem;\x0a\x0a\x09overflow:\x20hidden;\x0a}\x0adiv.play\x20.input\x20textarea\x20{\x0a\x09width:\x20100%;\x0a\x09height:\x20100%;\x0a\x09border:\x20none;\x0a\x09outline:\x20none;\x0a\x09resize:\x20none;\x0a\x0a\x09overflow:\x20hidden;\x0a}\x0adiv#playground\x20.input\x20textarea\x20{\x0a\x09overflow:\x20auto;\x0a\x09resize:\x20auto;\x0a}\x0adiv.play\x20.output\x20{\x0a\x09border-top:\x20none\x20!important;\x0a\x0a\x09padding:\x200.625rem;\x0a\x09max-height:\x2012.5rem;\x0a\x09overflow:\x20auto;\x0a\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a\x09border-bottom-left-radius:\x200.3125rem;\x0a}\x0adiv.play\x20.output\x20pre\x20{\x0a\x09padding:\x200;\x0a\x09border-radius:\x200;\x0a}\x0adiv.play\x20.input,\x0adiv.play\x20.input\x20textarea,\x0adiv.play\x20.output,\x0adiv.play\x20.output\x20pre\x20{\x0a\x09background:\x20#FFFFD8;\x0a}\x0adiv.play\x20.input,\x0adiv.play\x20.output\x20{\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a}\x0adiv.play\x20.buttons\x20{\x0a\x09float:\x20right;\x0a\x09padding:\x201.25rem\x200\x200.625rem\x200;\x0a\x09text-align:\x20right;\x0a}\x0adiv.play\x20.buttons\x20a\x20{\x0a\x09height:\x201rem;\x0a\x09margin-left:\x200.3125rem;\x0a\x09padding:\x200.625rem;\x0a\x09cursor:\x20pointer;\x0a}\x0a.output\x20.stderr\x20{\x0a\x09color:\x20#933;\x0a}\x0a.output\x20.system\x20{\x0a\x09color:\x20#999;\x0a}\x0a\x0a/*\x20drop-down\x20playground\x20*/\x0adiv#playground\x20{\x0a\x09/*\x20start\x20hidden;\x20revealed\x20by\x20javascript\x20*/\x0a\x09display:\x20none;\x0a}\x0adiv#playground\x20{\x0a\x09position:\x20absolute;\x0a\x09top:\x203.938rem;\x0a\x09right:\x201.25rem;\x0a\x09padding:\x200\x200.625rem\x200.625rem\x200.625rem;\x0a\x09z-index:\x201;\x0a\x09text-align:\x20left;\x0a\x09background:\x20#E0EBF5;\x0a\x0a\x09border:\x200.0625rem\x20solid\x20#B0BBC5;\x0a\x09border-top:\x20none;\x0a\x0a\x09border-bottom-left-radius:\x200.3125rem;\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a}\x0adiv#playground\x20.code\x20{\x0a\x09width:\x2032.5rem;\x0a\x09height:\x2012.5rem;\x0a}\x0adiv#playground\x20.output\x20{\x0a\x09height:\x206.25rem;\x0a}\x0a\x0a/*\x20Inline\x20runnable\x20snippets\x20(play.js/initPlayground)\x20*/\x0a#content\x20.code\x20pre,\x20#content\x20.playground\x20pre,\x20#content\x20.output\x20pre\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x09outline:\x200\x20solid\x20transparent;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto;\x0a}\x0a#content\x20.playground\x20.number,\x20#content\x20.code\x20.number\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#999;\x0a}\x0a#content\x20.code,\x20#content\x20.playground,\x20#content\x20.output\x20{\x0a\x09width:\x20auto;\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x201.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200.625rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.3125rem;\x0a}\x0a#content\x20.code,\x20#content\x20.playground\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#e9e9e9;\x0a}\x0a#content\x20.output\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#202020;\x0a}\x0a#content\x20.output\x20.stdout,\x20#content\x20.output\x20pre\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#e6e6e6;\x0a}\x0a#content\x20.output\x20.stderr,\x20#content\x20.output\x20.error\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20rgb(244,\x2074,\x2063);\x0a}\x0a#content\x20.output\x20.system,\x20#content\x20.output\x20.exit\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20rgb(255,\x20209,\x2077)\x0a}\x0a#content\x20.buttons\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float:\x20right;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x20-3.125rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20right:\x201.875rem;\x0a}\x0a#content\x20.output\x20.buttons\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x20-3.75rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20right:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x200;\x0a}\x0a#content\x20.buttons\x20.kill\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a}\x0aa.error\x20{\x0a\x09font-weight:\x20bold;\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20white;\x0a\x09background-color:\x20darkred;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-bottom-left-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-bottom-right-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-top-left-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-top-right-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200.125rem\x200.25rem\x200.125rem\x200.25rem;\x20/*\x20TRBL\x20*/\x0a}\x0a\x0a\x0a#heading-narrow\x20{\x0a\x09display:\x20none;\x0a}\x0a\x0a.downloading\x20{\x0a\x09background:\x20#F9F9BE;\x0a\x09padding:\x200.625rem;\x0a\x09text-align:\x20center;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0a\x0a@media\x20(max-width:\x2058.125em)\x20{\x0a\x09#heading-wide\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x09#heading-narrow\x20{\x0a\x09\x09display:\x20block;\x0a\x09}\x0a}\x0a\x0a@media\x20(max-width:\x2047.5em)\x20{\x0a\x09.container\x20.left,\x0a\x09.container\x20.right\x20{\x0a\x09\x09width:\x20auto;\x0a\x09\x09float:\x20none;\x0a\x09}\x0a\x0a\x09div#about\x20{\x0a\x09\x09max-width:\x2031.25rem;\x0a\x09\x09text-align:\x20center;\x0a\x09}\x0a}\x0a\x0a@media\x20(min-width:\x2043.75em)\x20and\x20(max-width:\x2062.5em)\x20{\x0a\x09div#menu\x20>\x20a\x20{\x0a\x09\x09margin:\x200.3125rem\x200;\x0a\x09\x09font-size:\x200.875rem;\x0a\x09}\x0a\x0a\x09input#search\x20{\x0a\x09\x09font-size:\x200.875rem;\x0a\x09}\x0a}\x0a\x0a@media\x20(max-width:\x2043.75em)\x20{\x0a\x09body\x20{\x0a\x09\x09font-size:\x200.9375rem;\x0a\x09}\x0a\x0a\x09div#playground\x20{\x0a\x09\x09left:\x200;\x0a\x09\x09right:\x200;\x0a\x09}\x0a\x0a\x09pre,\x0a\x09code\x20{\x0a\x09\x09font-size:\x200.866rem;\x0a\x09}\x0a\x0a\x09div#page\x20>\x20.container\x20{\x0a\x09\x09padding:\x200\x200.625rem;\x0a\x09}\x0a\x0a\x09div#topbar\x20{\x0a\x09\x09height:\x20auto;\x0a\x09\x09padding:\x200.625rem;\x0a\x09}\x0a\x0a\x09div#topbar\x20>\x20.container\x20{\x0a\x09\x09padding:\x200;\x0a\x09}\x0a\x0a\x09#heading-wide\x20{\x0a\x09\x09display:\x20block;\x0a\x09}\x0a\x09#heading-narrow\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x0a\x09.top-heading\x20{\x0a\x09\x09float:\x20none;\x0a\x09\x09display:\x20inline-block;\x0a\x09\x09padding:\x200.75rem;\x0a\x09}\x0a\x0a\x09div#menu\x20{\x0a\x09\x09padding:\x200;\x0a\x09\x09min-width:\x200;\x0a\x09\x09text-align:\x20left;\x0a\x09\x09float:\x20left;\x0a\x09}\x0a\x0a\x09div#menu\x20>\x20a\x20{\x0a\x09\x09display:\x20block;\x0a\x09\x09margin-left:\x200;\x0a\x09\x09margin-right:\x200;\x0a\x09}\x0a\x0a\x09#menu\x20.search-box\x20{\x0a\x09\x09display:\x20flex;\x0a\x09\x09width:\x20100%;\x0a\x09}\x0a\x0a\x09#menu-button\x20{\x0a\x09\x09display:\x20inline-block;\x0a\x09}\x0a\x0a\x09p,\x0a\x09pre,\x0a\x09ul,\x0a\x09ol\x20{\x0a\x09\x09margin:\x200.625rem;\x0a\x09}\x0a\x0a\x09.pkg-synopsis\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x0a\x09img.gopher\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a}\x0a\x0a@media\x20(max-width:\x2030em)\x20{\x0a\x09#heading-wide\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x09#heading-narrow\x20{\x0a\x09\x09display:\x20block;\x0a\x09}\x0a}\x0a\x0a@media\x20print\x20{\x0a\x09pre\x20{\x0a\x09\x09background:\x20#FFF;\x0a\x09\x09border:\x200.0625rem\x20solid\x20#BBB;\x0a\x09\x09white-space:\x20pre-wrap;\x0a\x09}\x0a}\x0a", + "style.css": "body\x20{\x0a\x09margin:\x200;\x0a\x09font-family:\x20Arial,\x20sans-serif;\x0a\x09background-color:\x20#fff;\x0a\x09line-height:\x201.3;\x0a\x09text-align:\x20center;\x0a\x09color:\x20#222;\x0a}\x0apre,\x0acode\x20{\x0a\x09font-family:\x20Menlo,\x20monospace;\x0a\x09font-size:\x200.875rem;\x0a}\x0apre\x20{\x0a\x09line-height:\x201.4;\x0a\x09overflow-x:\x20auto;\x0a}\x0apre\x20.comment\x20{\x0a\x09color:\x20#006600;\x0a}\x0apre\x20.highlight,\x0apre\x20.highlight-comment,\x0apre\x20.selection-highlight,\x0apre\x20.selection-highlight-comment\x20{\x0a\x09background:\x20#FFFF00;\x0a}\x0apre\x20.selection,\x0apre\x20.selection-comment\x20{\x0a\x09background:\x20#FF9632;\x0a}\x0apre\x20.ln\x20{\x0a\x09color:\x20#999;\x0a\x09background:\x20#efefef;\x0a}\x0a.ln\x20{\x0a\x09-webkit-user-select:\x20none;\x0a\x09-moz-user-select:\x20none;\x0a\x09-ms-user-select:\x20none;\x0a\x09user-select:\x20none;\x0a\x0a\x09/*\x20Ensure\x208\x20characters\x20in\x20the\x20document\x20-\x20which\x20due\x20to\x20floating\x0a\x20\x20\x20*\x20point\x20rendering\x20issues,\x20might\x20have\x20a\x20width\x20of\x20less\x20than\x201\x20each\x20-\x20are\x208\x0a\x20\x20\x20*\x20characters\x20wide,\x20so\x20a\x20tab\x20in\x20the\x209th\x20position\x20indents\x20properly.\x20See\x0a\x20\x20\x20*\x20https://github.com/webcompat/web-bugs/issues/17530#issuecomment-402675091\x0a\x20\x20\x20*\x20for\x20more\x20information.\x20*/\x0a\x09display:\x20inline-block;\x0a\x09width:\x208ch;\x0a}\x0a\x0a.search-nav{\x0a\x09margin-left:\x201.25rem;\x0a\x09font-size:\x200.875rem;\x0a\x09column-gap:\x201.25rem;\x0a\x09column-fill:\x20auto;\x0a\x09column-width:\x2014rem;\x0a}\x0a\x0a.search-nav\x20.indent\x20{\x0a\x09margin-left:\x201.25rem;\x0a}\x0a\x0aa,\x0a.exampleHeading\x20.text,\x0a.expandAll\x20{\x0a\x09color:\x20#375EAB;\x0a\x09text-decoration:\x20none;\x0a}\x0aa:hover,\x0a.exampleHeading\x20.text:hover,\x0a.expandAll:hover\x20{\x0a\x09text-decoration:\x20underline;\x0a}\x0a.article\x20a\x20{\x0a\x09text-decoration:\x20underline;\x0a}\x0a.article\x20.title\x20a\x20{\x0a\x09text-decoration:\x20none;\x0a}\x0a\x0a.permalink\x20{\x0a\x09display:\x20none;\x0a}\x0a:hover\x20>\x20.permalink\x20{\x0a\x09display:\x20inline;\x0a}\x0a\x0ap,\x20li\x20{\x0a\x09max-width:\x2050rem;\x0a\x09word-wrap:\x20break-word;\x0a}\x0ap,\x0apre,\x0aul,\x0aol\x20{\x0a\x09margin:\x201.25rem;\x0a}\x0apre\x20{\x0a\x09background:\x20#EFEFEF;\x0a\x09padding:\x200.625rem;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0a\x0ah1,\x0ah2,\x0ah3,\x0ah4,\x0a.rootHeading\x20{\x0a\x09margin:\x201.25rem\x200\x201.25rem;\x0a\x09padding:\x200;\x0a\x09color:\x20#375EAB;\x0a\x09font-weight:\x20bold;\x0a}\x0ah1\x20{\x0a\x09font-size:\x201.75rem;\x0a\x09line-height:\x201;\x0a}\x0ah1\x20.text-muted\x20{\x0a\x09color:#777;\x0a}\x0ah2\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09background:\x20#E0EBF5;\x0a\x09padding:\x200.5rem;\x0a\x09line-height:\x201.25;\x0a\x09font-weight:\x20normal;\x0a\x09overflow:\x20auto;\x0a\x09overflow-wrap:\x20break-word;\x0a}\x0ah2\x20a\x20{\x0a\x09font-weight:\x20bold;\x0a}\x0ah3\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09line-height:\x201.25;\x0a\x09overflow:\x20auto;\x0a\x09overflow-wrap:\x20break-word;\x0a}\x0ah3,\x0ah4\x20{\x0a\x09margin:\x201.25rem\x200.3125rem;\x0a}\x0ah4\x20{\x0a\x09font-size:\x201rem;\x0a}\x0a.rootHeading\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09margin:\x200;\x0a}\x0a\x0ah2\x20>\x20span,\x0ah3\x20>\x20span\x20{\x0a\x09float:\x20right;\x0a\x09margin:\x200\x2025px\x200\x200;\x0a\x09font-weight:\x20normal;\x0a\x09color:\x20#5279C7;\x0a}\x0a\x0adl\x20{\x0a\x09margin:\x201.25rem;\x0a}\x0add\x20{\x0a\x09margin:\x200\x200\x200\x201.25rem;\x0a}\x0adl,\x0add\x20{\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv#nav\x20table\x20td\x20{\x0a\x09vertical-align:\x20top;\x0a}\x0a\x0a#pkg-index\x20h3\x20{\x0a\x09font-size:\x201rem;\x0a}\x0a.pkg-dir\x20{\x0a\x09padding:\x200\x200.625rem;\x0a}\x0a.pkg-dir\x20table\x20{\x0a\x09border-collapse:\x20collapse;\x0a\x09border-spacing:\x200;\x0a}\x0a.pkg-name\x20{\x0a\x09padding-right:\x200.625rem;\x0a}\x0a.alert\x20{\x0a\x09color:\x20#AA0000;\x0a}\x0a\x0a.top-heading\x20{\x0a\x09float:\x20left;\x0a\x09padding:\x201.313rem\x200;\x0a\x09font-size:\x201.25rem;\x0a\x09font-weight:\x20normal;\x0a}\x0a.top-heading\x20a\x20{\x0a\x09color:\x20#222;\x0a\x09text-decoration:\x20none;\x0a}\x0a\x0a#pkg-examples\x20h3\x20{\x0a\x09float:\x20left;\x0a}\x0a\x0a#pkg-examples\x20dl\x20{\x0a\x09clear:\x20both;\x0a}\x0a\x0a.expandAll\x20{\x0a\x09cursor:\x20pointer;\x0a\x09float:\x20left;\x0a\x09margin:\x201.25rem\x200;\x0a}\x0a\x0adiv#topbar\x20{\x0a\x09background:\x20#E0EBF5;\x0a\x09height:\x204rem;\x0a\x09overflow:\x20hidden;\x0a}\x0a\x0adiv#page\x20{\x0a\x09width:\x20100%;\x0a}\x0adiv#page\x20>\x20.container,\x0adiv#topbar\x20>\x20.container\x20{\x0a\x09text-align:\x20left;\x0a\x09margin-left:\x20auto;\x0a\x09margin-right:\x20auto;\x0a\x09padding:\x200\x201.25rem;\x0a}\x0adiv#topbar\x20>\x20.container,\x0adiv#page\x20>\x20.container\x20{\x0a\x09max-width:\x2059.38rem;\x0a}\x0adiv#page.wide\x20>\x20.container,\x0adiv#topbar.wide\x20>\x20.container\x20{\x0a\x09max-width:\x20none;\x0a}\x0adiv#plusone\x20{\x0a\x09float:\x20right;\x0a\x09clear:\x20right;\x0a\x09margin-top:\x200.3125rem;\x0a}\x0a\x0adiv#footer\x20{\x0a\x09text-align:\x20center;\x0a\x09color:\x20#666;\x0a\x09font-size:\x200.875rem;\x0a\x09margin:\x202.5rem\x200;\x0a}\x0a\x0adiv#menu\x20>\x20a,\x0ainput#search,\x0adiv#learn\x20.buttons\x20a,\x0adiv.play\x20.buttons\x20a,\x0adiv#blog\x20.read\x20a,\x0a#menu-button\x20{\x0a\x09padding:\x200.625rem;\x0a\x0a\x09text-decoration:\x20none;\x0a\x09font-size:\x201rem;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0adiv#playground\x20.buttons\x20a,\x0adiv#menu\x20>\x20a,\x0ainput#search,\x0a#menu-button\x20{\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a}\x0adiv#playground\x20.buttons\x20a,\x0adiv#menu\x20>\x20a,\x0a#menu-button\x20{\x0a\x09color:\x20white;\x0a\x09background:\x20#375EAB;\x0a}\x0a#playgroundButton.active\x20{\x0a\x09background:\x20white;\x0a\x09color:\x20#375EAB;\x0a}\x0aa#start,\x0adiv#learn\x20.buttons\x20a,\x0adiv.play\x20.buttons\x20a,\x0adiv#blog\x20.read\x20a\x20{\x0a\x09color:\x20#222;\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a\x09background:\x20#E0EBF5;\x0a}\x0a.download\x20{\x0a\x09width:\x209.375rem;\x0a}\x0a\x0adiv#menu\x20{\x0a\x09text-align:\x20right;\x0a\x09padding:\x200.625rem;\x0a\x09white-space:\x20nowrap;\x0a\x09max-height:\x200;\x0a\x09-moz-transition:\x20max-height\x20.25s\x20linear;\x0a\x09transition:\x20max-height\x20.25s\x20linear;\x0a\x09width:\x20100%;\x0a}\x0adiv#menu.menu-visible\x20{\x0a\x09max-height:\x2031.25rem;\x0a}\x0adiv#menu\x20>\x20a,\x0a#menu-button\x20{\x0a\x09margin:\x200.625rem\x200.125rem;\x0a\x09padding:\x200.625rem;\x0a}\x0a::-webkit-input-placeholder\x20{\x0a\x09color:\x20#7f7f7f;\x0a\x09opacity:\x201;\x0a}\x0a::placeholder\x20{\x0a\x09color:\x20#7f7f7f;\x0a\x09opacity:\x201;\x0a}\x0a#menu\x20.search-box\x20{\x0a\x09display:\x20inline-flex;\x0a\x09width:\x208.75rem;\x0a}\x0ainput#search\x20{\x0a\x09background:\x20white;\x0a\x09color:\x20#222;\x0a\x09box-sizing:\x20border-box;\x0a\x09-webkit-appearance:\x20none;\x0a\x09border-top-right-radius:\x200;\x0a\x09border-bottom-right-radius:\x200;\x0a\x09border-right:\x200;\x0a\x09margin-right:\x200;\x0a\x09flex-grow:\x201;\x0a\x09max-width:\x20100%;\x0a\x09min-width:\x205.625rem;\x0a}\x0ainput#search:-webkit-search-decoration\x20{\x0a\x09-webkit-appearance:\x20none;\x0a}\x0ainput#search:-moz-ui-invalid\x20{\x0a\x09box-shadow:\x20unset;\x0a}\x0ainput#search\x20+\x20button\x20{\x0a\x09display:\x20inline;\x0a\x09font-size:\x201em;\x0a\x09background-color:\x20#375EAB;\x0a\x09color:\x20white;\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a\x09border-top-left-radius:\x200;\x0a\x09border-top-right-radius:\x200.3125rem;\x0a\x09border-bottom-left-radius:\x200;\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a\x09margin-left:\x200;\x0a\x09cursor:\x20pointer;\x0a}\x0ainput#search\x20+\x20button\x20span\x20{\x0a\x09display:\x20flex;\x0a}\x0ainput#search\x20+\x20button\x20svg\x20{\x0a\x09fill:\x20white\x0a}\x0a\x0a#menu-button\x20{\x0a\x09display:\x20none;\x0a\x09position:\x20absolute;\x0a\x09right:\x200.3125rem;\x0a\x09top:\x200;\x0a\x09margin-right:\x200.3125rem;\x0a}\x0a#menu-button-arrow\x20{\x0a\x09display:\x20inline-block;\x0a}\x0a.vertical-flip\x20{\x0a\x09transform:\x20rotate(-180deg);\x0a}\x0a\x0adiv.left\x20{\x0a\x09float:\x20left;\x0a\x09clear:\x20left;\x0a\x09margin-right:\x202.5%;\x0a}\x0adiv.right\x20{\x0a\x09float:\x20right;\x0a\x09clear:\x20right;\x0a\x09margin-left:\x202.5%;\x0a}\x0adiv.left,\x0adiv.right\x20{\x0a\x09width:\x2045%;\x0a}\x0a\x0adiv#learn,\x0adiv#about\x20{\x0a\x09padding-top:\x201.25rem;\x0a}\x0adiv#learn\x20h2,\x0adiv#about\x20{\x0a\x09margin:\x200;\x0a}\x0adiv#about\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09margin:\x200\x20auto\x201.875rem;\x0a}\x0adiv#gopher\x20{\x0a\x09background:\x20url(/doc/gopher/frontpage.png)\x20no-repeat;\x0a\x09background-position:\x20center\x20top;\x0a\x09height:\x209.688rem;\x0a\x09max-height:\x20200px;\x20/*\x20Setting\x20in\x20px\x20to\x20prevent\x20the\x20gopher\x20from\x20blowing\x20up\x20in\x20very\x20high\x20default\x20font-sizes\x20*/\x0a}\x0aa#start\x20{\x0a\x09display:\x20block;\x0a\x09padding:\x200.625rem;\x0a\x0a\x09text-align:\x20center;\x0a\x09text-decoration:\x20none;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0aa#start\x20.big\x20{\x0a\x09display:\x20block;\x0a\x09font-weight:\x20bold;\x0a\x09font-size:\x201.25rem;\x0a}\x0aa#start\x20.desc\x20{\x0a\x09display:\x20block;\x0a\x09font-size:\x200.875rem;\x0a\x09font-weight:\x20normal;\x0a\x09margin-top:\x200.3125rem;\x0a}\x0a\x0adiv#learn\x20.popout\x20{\x0a\x09float:\x20right;\x0a\x09display:\x20block;\x0a\x09cursor:\x20pointer;\x0a\x09font-size:\x200.75rem;\x0a\x09background:\x20url(/doc/share.png)\x20no-repeat;\x0a\x09background-position:\x20right\x20center;\x0a\x09padding:\x200.375rem\x201.688rem;\x0a}\x0adiv#learn\x20pre,\x0adiv#learn\x20textarea\x20{\x0a\x09padding:\x200;\x0a\x09margin:\x200;\x0a\x09font-family:\x20Menlo,\x20monospace;\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv#learn\x20.input\x20{\x0a\x09padding:\x200.625rem;\x0a\x09margin-top:\x200.625rem;\x0a\x09height:\x209.375rem;\x0a\x0a\x09border-top-left-radius:\x200.3125rem;\x0a\x09border-top-right-radius:\x200.3125rem;\x0a}\x0adiv#learn\x20.input\x20textarea\x20{\x0a\x09width:\x20100%;\x0a\x09height:\x20100%;\x0a\x09border:\x20none;\x0a\x09outline:\x20none;\x0a\x09resize:\x20none;\x0a}\x0adiv#learn\x20.output\x20{\x0a\x09border-top:\x20none\x20!important;\x0a\x0a\x09padding:\x200.625rem;\x0a\x09height:\x203.688rem;\x0a\x09overflow:\x20auto;\x0a\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a\x09border-bottom-left-radius:\x200.3125rem;\x0a}\x0adiv#learn\x20.output\x20pre\x20{\x0a\x09padding:\x200;\x0a\x09border-radius:\x200;\x0a}\x0adiv#learn\x20.input,\x0adiv#learn\x20.input\x20textarea,\x0adiv#learn\x20.output,\x0adiv#learn\x20.output\x20pre\x20{\x0a\x09background:\x20#FFFFD8;\x0a}\x0adiv#learn\x20.input,\x0adiv#learn\x20.output\x20{\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a}\x0adiv#learn\x20.buttons\x20{\x0a\x09float:\x20right;\x0a\x09padding:\x201.25rem\x200\x200.625rem\x200;\x0a\x09text-align:\x20right;\x0a}\x0adiv#learn\x20.buttons\x20a\x20{\x0a\x09height:\x201rem;\x0a\x09margin-left:\x200.3125rem;\x0a\x09padding:\x200.625rem;\x0a}\x0adiv#learn\x20.toys\x20{\x0a\x09margin-top:\x200.5rem;\x0a}\x0adiv#learn\x20.toys\x20select\x20{\x0a\x09font-size:\x200.875rem;\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a\x09margin:\x200;\x0a}\x0adiv#learn\x20.output\x20.exit\x20{\x0a\x09display:\x20none;\x0a}\x0a\x0adiv#video\x20{\x0a\x09max-width:\x20100%;\x0a}\x0adiv#blog,\x0adiv#video\x20{\x0a\x09margin-top:\x202.5rem;\x0a}\x0adiv#blog\x20>\x20a,\x0adiv#blog\x20>\x20div,\x0adiv#blog\x20>\x20h2,\x0adiv#video\x20>\x20a,\x0adiv#video\x20>\x20div,\x0adiv#video\x20>\x20h2\x20{\x0a\x09margin-bottom:\x200.625rem;\x0a}\x0adiv#blog\x20.title,\x0adiv#video\x20.title\x20{\x0a\x09display:\x20block;\x0a\x09font-size:\x201.25rem;\x0a}\x0adiv#blog\x20.when\x20{\x0a\x09color:\x20#666;\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv#blog\x20.read\x20{\x0a\x09text-align:\x20right;\x0a}\x0a\x0a@supports\x20(--c:\x200)\x20{\x0a\x09[style*=\"--aspect-ratio-padding:\"]\x20{\x0a\x09\x09position:\x20relative;\x0a\x09\x09overflow:\x20hidden;\x0a\x09\x09padding-top:\x20var(--aspect-ratio-padding);\x0a\x09}\x0a\x0a\x09[style*=\"--aspect-ratio-padding:\"]>*\x20{\x0a\x09\x09position:\x20absolute;\x0a\x09\x09top:\x200;\x0a\x09\x09left:\x200;\x0a\x09\x09width:\x20100%;\x0a\x09\x09height:\x20100%;\x0a\x09}\x0a}\x0a\x0a.toggleButton\x20{\x20cursor:\x20pointer;\x20}\x0a.toggle\x20>\x20.collapsed\x20{\x20display:\x20block;\x20}\x0a.toggle\x20>\x20.expanded\x20{\x20display:\x20none;\x20}\x0a.toggleVisible\x20>\x20.collapsed\x20{\x20display:\x20none;\x20}\x0a.toggleVisible\x20>\x20.expanded\x20{\x20display:\x20block;\x20}\x0a\x0atable.codetable\x20{\x20margin-left:\x20auto;\x20margin-right:\x20auto;\x20border-style:\x20none;\x20}\x0atable.codetable\x20td\x20{\x20padding-right:\x200.625rem;\x20}\x0ahr\x20{\x20border-style:\x20none;\x20border-top:\x200.0625rem\x20solid\x20black;\x20}\x0a\x0aimg.gopher\x20{\x0a\x09float:\x20right;\x0a\x09margin-left:\x200.625rem;\x0a\x09margin-bottom:\x200.625rem;\x0a\x09z-index:\x20-1;\x0a}\x0ah2\x20{\x20clear:\x20right;\x20}\x0a\x0a/*\x20example\x20and\x20drop-down\x20playground\x20*/\x0adiv.play\x20{\x0a\x09padding:\x200\x201.25rem\x202.5rem\x201.25rem;\x0a}\x0adiv.play\x20pre,\x0adiv.play\x20textarea,\x0adiv.play\x20.lines\x20{\x0a\x09padding:\x200;\x0a\x09margin:\x200;\x0a\x09font-family:\x20Menlo,\x20monospace;\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv.play\x20.input\x20{\x0a\x09padding:\x200.625rem;\x0a\x09margin-top:\x200.625rem;\x0a\x0a\x09border-top-left-radius:\x200.3125rem;\x0a\x09border-top-right-radius:\x200.3125rem;\x0a\x0a\x09overflow:\x20hidden;\x0a}\x0adiv.play\x20.input\x20textarea\x20{\x0a\x09width:\x20100%;\x0a\x09height:\x20100%;\x0a\x09border:\x20none;\x0a\x09outline:\x20none;\x0a\x09resize:\x20none;\x0a\x0a\x09overflow:\x20hidden;\x0a}\x0adiv#playground\x20.input\x20textarea\x20{\x0a\x09overflow:\x20auto;\x0a\x09resize:\x20auto;\x0a}\x0adiv.play\x20.output\x20{\x0a\x09border-top:\x20none\x20!important;\x0a\x0a\x09padding:\x200.625rem;\x0a\x09max-height:\x2012.5rem;\x0a\x09overflow:\x20auto;\x0a\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a\x09border-bottom-left-radius:\x200.3125rem;\x0a}\x0adiv.play\x20.output\x20pre\x20{\x0a\x09padding:\x200;\x0a\x09border-radius:\x200;\x0a}\x0adiv.play\x20.input,\x0adiv.play\x20.input\x20textarea,\x0adiv.play\x20.output,\x0adiv.play\x20.output\x20pre\x20{\x0a\x09background:\x20#FFFFD8;\x0a}\x0adiv.play\x20.input,\x0adiv.play\x20.output\x20{\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a}\x0adiv.play\x20.buttons\x20{\x0a\x09float:\x20right;\x0a\x09padding:\x201.25rem\x200\x200.625rem\x200;\x0a\x09text-align:\x20right;\x0a}\x0adiv.play\x20.buttons\x20a\x20{\x0a\x09height:\x201rem;\x0a\x09margin-left:\x200.3125rem;\x0a\x09padding:\x200.625rem;\x0a\x09cursor:\x20pointer;\x0a}\x0a.output\x20.stderr\x20{\x0a\x09color:\x20#933;\x0a}\x0a.output\x20.system\x20{\x0a\x09color:\x20#999;\x0a}\x0a\x0a/*\x20drop-down\x20playground\x20*/\x0adiv#playground\x20{\x0a\x09/*\x20start\x20hidden;\x20revealed\x20by\x20javascript\x20*/\x0a\x09display:\x20none;\x0a}\x0adiv#playground\x20{\x0a\x09position:\x20absolute;\x0a\x09top:\x203.938rem;\x0a\x09right:\x201.25rem;\x0a\x09padding:\x200\x200.625rem\x200.625rem\x200.625rem;\x0a\x09z-index:\x201;\x0a\x09text-align:\x20left;\x0a\x09background:\x20#E0EBF5;\x0a\x0a\x09border:\x200.0625rem\x20solid\x20#B0BBC5;\x0a\x09border-top:\x20none;\x0a\x0a\x09border-bottom-left-radius:\x200.3125rem;\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a}\x0adiv#playground\x20.code\x20{\x0a\x09width:\x2032.5rem;\x0a\x09height:\x2012.5rem;\x0a}\x0adiv#playground\x20.output\x20{\x0a\x09height:\x206.25rem;\x0a}\x0a\x0a/*\x20Inline\x20runnable\x20snippets\x20(play.js/initPlayground)\x20*/\x0a#content\x20.code\x20pre,\x20#content\x20.playground\x20pre,\x20#content\x20.output\x20pre\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x09outline:\x200\x20solid\x20transparent;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto;\x0a}\x0a#content\x20.playground\x20.number,\x20#content\x20.code\x20.number\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#999;\x0a}\x0a#content\x20.code,\x20#content\x20.playground,\x20#content\x20.output\x20{\x0a\x09width:\x20auto;\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x201.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200.625rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.3125rem;\x0a}\x0a#content\x20.code,\x20#content\x20.playground\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#e9e9e9;\x0a}\x0a#content\x20.output\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#202020;\x0a}\x0a#content\x20.output\x20.stdout,\x20#content\x20.output\x20pre\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#e6e6e6;\x0a}\x0a#content\x20.output\x20.stderr,\x20#content\x20.output\x20.error\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20rgb(244,\x2074,\x2063);\x0a}\x0a#content\x20.output\x20.system,\x20#content\x20.output\x20.exit\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20rgb(255,\x20209,\x2077)\x0a}\x0a#content\x20.buttons\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float:\x20right;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x20-3.125rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20right:\x201.875rem;\x0a}\x0a#content\x20.output\x20.buttons\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x20-3.75rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20right:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x200;\x0a}\x0a#content\x20.buttons\x20.kill\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a}\x0aa.error\x20{\x0a\x09font-weight:\x20bold;\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20white;\x0a\x09background-color:\x20darkred;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-bottom-left-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-bottom-right-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-top-left-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-top-right-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200.125rem\x200.25rem\x200.125rem\x200.25rem;\x20/*\x20TRBL\x20*/\x0a}\x0a\x0a\x0a#heading-narrow\x20{\x0a\x09display:\x20none;\x0a}\x0a\x0a.downloading\x20{\x0a\x09background:\x20#F9F9BE;\x0a\x09padding:\x200.625rem;\x0a\x09text-align:\x20center;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0a\x0a@media\x20(max-width:\x2058.125em)\x20{\x0a\x09#heading-wide\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x09#heading-narrow\x20{\x0a\x09\x09display:\x20block;\x0a\x09}\x0a}\x0a\x0a@media\x20(max-width:\x2047.5em)\x20{\x0a\x09.container\x20.left,\x0a\x09.container\x20.right\x20{\x0a\x09\x09width:\x20auto;\x0a\x09\x09float:\x20none;\x0a\x09}\x0a\x0a\x09div#about\x20{\x0a\x09\x09max-width:\x2031.25rem;\x0a\x09\x09text-align:\x20center;\x0a\x09}\x0a}\x0a\x0a@media\x20(min-width:\x2043.75em)\x20and\x20(max-width:\x2062.5em)\x20{\x0a\x09div#menu\x20>\x20a\x20{\x0a\x09\x09margin:\x200.3125rem\x200;\x0a\x09\x09font-size:\x200.875rem;\x0a\x09}\x0a\x0a\x09input#search\x20{\x0a\x09\x09font-size:\x200.875rem;\x0a\x09}\x0a}\x0a\x0a@media\x20(max-width:\x2043.75em)\x20{\x0a\x09body\x20{\x0a\x09\x09font-size:\x200.9375rem;\x0a\x09}\x0a\x0a\x09div#playground\x20{\x0a\x09\x09left:\x200;\x0a\x09\x09right:\x200;\x0a\x09}\x0a\x0a\x09pre,\x0a\x09code\x20{\x0a\x09\x09font-size:\x200.866rem;\x0a\x09}\x0a\x0a\x09div#page\x20>\x20.container\x20{\x0a\x09\x09padding:\x200\x200.625rem;\x0a\x09}\x0a\x0a\x09div#topbar\x20{\x0a\x09\x09height:\x20auto;\x0a\x09\x09padding:\x200.625rem;\x0a\x09}\x0a\x0a\x09div#topbar\x20>\x20.container\x20{\x0a\x09\x09padding:\x200;\x0a\x09}\x0a\x0a\x09#heading-wide\x20{\x0a\x09\x09display:\x20block;\x0a\x09}\x0a\x09#heading-narrow\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x0a\x09.top-heading\x20{\x0a\x09\x09float:\x20none;\x0a\x09\x09display:\x20inline-block;\x0a\x09\x09padding:\x200.75rem;\x0a\x09}\x0a\x0a\x09div#menu\x20{\x0a\x09\x09padding:\x200;\x0a\x09\x09min-width:\x200;\x0a\x09\x09text-align:\x20left;\x0a\x09\x09float:\x20left;\x0a\x09}\x0a\x0a\x09div#menu\x20>\x20a\x20{\x0a\x09\x09display:\x20block;\x0a\x09\x09margin-left:\x200;\x0a\x09\x09margin-right:\x200;\x0a\x09}\x0a\x0a\x09#menu\x20.search-box\x20{\x0a\x09\x09display:\x20flex;\x0a\x09\x09width:\x20100%;\x0a\x09}\x0a\x0a\x09#menu-button\x20{\x0a\x09\x09display:\x20inline-block;\x0a\x09}\x0a\x0a\x09p,\x0a\x09pre,\x0a\x09ul,\x0a\x09ol\x20{\x0a\x09\x09margin:\x200.625rem;\x0a\x09}\x0a\x0a\x09.pkg-synopsis\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x0a\x09img.gopher\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a}\x0a\x0a@media\x20(max-width:\x2030em)\x20{\x0a\x09#heading-wide\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x09#heading-narrow\x20{\x0a\x09\x09display:\x20block;\x0a\x09}\x0a}\x0a\x0a@media\x20print\x20{\x0a\x09pre\x20{\x0a\x09\x09background:\x20#FFF;\x0a\x09\x09border:\x200.0625rem\x20solid\x20#BBB;\x0a\x09\x09white-space:\x20pre-wrap;\x0a\x09}\x0a}\x0a", } diff --git a/godoc/static/style.css b/godoc/static/style.css index 1591f1c4a4..36d2eb82ac 100644 --- a/godoc/static/style.css +++ b/godoc/static/style.css @@ -47,6 +47,18 @@ pre .ln { width: 8ch; } +.search-nav{ + margin-left: 1.25rem; + font-size: 0.875rem; + column-gap: 1.25rem; + column-fill: auto; + column-width: 14rem; +} + +.search-nav .indent { + margin-left: 1.25rem; +} + a, .exampleHeading .text, .expandAll {