2013-07-31 19:01:10 -06:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
2015-04-17 17:09:18 -06:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<meta name="theme-color" content="#375EAB">
|
2013-07-31 19:01:10 -06:00
|
|
|
{{with .Tabtitle}}
|
|
|
|
<title>{{html .}} - The Go Programming Language</title>
|
|
|
|
{{else}}
|
|
|
|
<title>The Go Programming Language</title>
|
|
|
|
{{end}}
|
2013-08-01 01:36:56 -06:00
|
|
|
<link type="text/css" rel="stylesheet" href="/lib/godoc/style.css">
|
2013-07-31 19:01:10 -06:00
|
|
|
{{if .SearchBox}}
|
|
|
|
<link rel="search" type="application/opensearchdescription+xml" title="godoc" href="/opensearch.xml" />
|
|
|
|
{{end}}
|
2014-03-14 16:58:22 -06:00
|
|
|
<link rel="stylesheet" href="/lib/godoc/jquery.treeview.css">
|
2018-03-13 03:51:37 -06:00
|
|
|
<script>window.initFuncs = [];</script>
|
2018-09-04 10:55:45 -06:00
|
|
|
{{with .GoogleAnalytics}}
|
|
|
|
<script type="text/javascript">
|
|
|
|
var _gaq = _gaq || [];
|
|
|
|
_gaq.push(["_setAccount", "{{.}}"]);
|
|
|
|
window.trackPageview = function() {
|
|
|
|
_gaq.push(["_trackPageview", location.pathname+location.hash]);
|
|
|
|
};
|
|
|
|
window.trackPageview();
|
|
|
|
window.trackEvent = function(category, action, opt_label, opt_value, opt_noninteraction) {
|
|
|
|
_gaq.push(["_trackEvent", category, action, opt_label, opt_value, opt_noninteraction]);
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
{{end}}
|
2018-03-13 03:51:37 -06:00
|
|
|
<script src="/lib/godoc/jquery.js" defer></script>
|
|
|
|
<script src="/lib/godoc/jquery.treeview.js" defer></script>
|
|
|
|
<script src="/lib/godoc/jquery.treeview.edit.js" defer></script>
|
|
|
|
|
|
|
|
{{if .Playground}}
|
|
|
|
<script src="/lib/godoc/playground.js" defer></script>
|
|
|
|
{{end}}
|
|
|
|
{{with .Version}}<script>var goVersion = {{printf "%q" .}};</script>{{end}}
|
|
|
|
<script src="/lib/godoc/godocs.js" defer></script>
|
2013-07-31 19:01:10 -06:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
2014-07-15 17:39:11 -06:00
|
|
|
<div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
|
|
|
|
...
|
|
|
|
</div><!-- #lowframe -->
|
|
|
|
|
2013-07-31 19:01:10 -06:00
|
|
|
<div id="topbar"{{if .Title}} class="wide"{{end}}><div class="container">
|
2015-04-17 17:09:18 -06:00
|
|
|
<div class="top-heading" id="heading-wide"><a href="/">The Go Programming Language</a></div>
|
|
|
|
<div class="top-heading" id="heading-narrow"><a href="/">Go</a></div>
|
|
|
|
<a href="#" id="menu-button"><span id="menu-button-arrow">▽</span></a>
|
2013-07-31 19:01:10 -06:00
|
|
|
<form method="GET" action="/search">
|
|
|
|
<div id="menu">
|
|
|
|
<a href="/doc/">Documents</a>
|
|
|
|
<a href="/pkg/">Packages</a>
|
|
|
|
<a href="/project/">The Project</a>
|
|
|
|
<a href="/help/">Help</a>
|
2017-08-29 14:28:01 -06:00
|
|
|
{{if not .GoogleCN}}
|
2013-09-17 23:12:51 -06:00
|
|
|
<a href="/blog/">Blog</a>
|
2017-08-29 14:28:01 -06:00
|
|
|
{{end}}
|
2013-07-31 19:01:10 -06:00
|
|
|
{{if .Playground}}
|
|
|
|
<a id="playgroundButton" href="http://play.golang.org/" title="Show Go Playground">Play</a>
|
|
|
|
{{end}}
|
2017-12-11 11:51:56 -07:00
|
|
|
<span class="search-box"><input type="search" id="search" name="q" placeholder="Search" aria-label="Search" required><button type="submit"><span><!-- magnifying glass: --><svg width="24" height="24" viewBox="0 0 24 24"><title>submit search</title><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/><path d="M0 0h24v24H0z" fill="none"/></svg></span></button></span>
|
2013-07-31 19:01:10 -06:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div></div>
|
|
|
|
|
|
|
|
{{if .Playground}}
|
|
|
|
<div id="playground" class="play">
|
2016-02-10 11:03:24 -07:00
|
|
|
<div class="input"><textarea class="code" spellcheck="false">package main
|
2013-07-31 19:01:10 -06:00
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
fmt.Println("Hello, 世界")
|
|
|
|
}</textarea></div>
|
|
|
|
<div class="output"></div>
|
|
|
|
<div class="buttons">
|
|
|
|
<a class="run" title="Run this code [shift-enter]">Run</a>
|
|
|
|
<a class="fmt" title="Format this code">Format</a>
|
2017-08-02 14:37:59 -06:00
|
|
|
{{if not $.GoogleCN}}
|
2013-07-31 19:01:10 -06:00
|
|
|
<a class="share" title="Share this code">Share</a>
|
2015-09-01 17:49:30 -06:00
|
|
|
{{end}}
|
2013-07-31 19:01:10 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
<div id="page"{{if .Title}} class="wide"{{end}}>
|
|
|
|
<div class="container">
|
|
|
|
|
2016-09-16 06:42:50 -06:00
|
|
|
{{if or .Title .SrcPath}}
|
|
|
|
<h1>
|
|
|
|
{{html .Title}}
|
|
|
|
{{html .SrcPath | srcBreadcrumb}}
|
|
|
|
</h1>
|
2013-07-31 19:01:10 -06:00
|
|
|
{{end}}
|
2016-09-16 06:42:50 -06:00
|
|
|
|
2013-07-31 19:01:10 -06:00
|
|
|
{{with .Subtitle}}
|
|
|
|
<h2>{{html .}}</h2>
|
|
|
|
{{end}}
|
|
|
|
|
2016-09-16 06:42:50 -06:00
|
|
|
{{with .SrcPath}}
|
|
|
|
<h2>
|
|
|
|
Documentation: {{html . | srcToPkgLink}}
|
|
|
|
</h2>
|
|
|
|
{{end}}
|
|
|
|
|
2013-07-31 19:01:10 -06:00
|
|
|
{{/* The Table of Contents is automatically inserted in this <div>.
|
|
|
|
Do not delete this <div>. */}}
|
|
|
|
<div id="nav"></div>
|
|
|
|
|
|
|
|
{{/* Body is HTML-escaped elsewhere */}}
|
|
|
|
{{printf "%s" .Body}}
|
|
|
|
|
|
|
|
<div id="footer">
|
|
|
|
Build version {{html .Version}}.<br>
|
2014-03-12 17:50:06 -06:00
|
|
|
Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
|
2013-07-31 19:01:10 -06:00
|
|
|
the content of this page is licensed under the
|
|
|
|
Creative Commons Attribution 3.0 License,
|
|
|
|
and code is licensed under a <a href="/LICENSE">BSD license</a>.<br>
|
2017-08-02 14:37:59 -06:00
|
|
|
<a href="/doc/tos.html">Terms of Service</a> |
|
2013-07-31 19:01:10 -06:00
|
|
|
<a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div><!-- .container -->
|
|
|
|
</div><!-- #page -->
|
2018-09-04 10:55:45 -06:00
|
|
|
{{if .GoogleAnalytics}}
|
|
|
|
<script type="text/javascript">
|
|
|
|
(function() {
|
|
|
|
var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;
|
|
|
|
ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
|
|
|
|
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
{{end}}
|
2013-07-31 19:01:10 -06:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|