| <!DOCTYPE html> |
| <html lang="en"> |
| <meta charset="utf-8"> |
| <meta name="description" content="Go is an open source programming language that makes it easy to build simple, reliable, and efficient software."> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta name="theme-color" content="#00ADD8"> |
| {{with .Tabtitle}} |
| <title>{{html .}} - The Go Programming Language</title> |
| {{else}} |
| <title>The Go Programming Language</title> |
| {{end}} |
| <link href="https://fonts.googleapis.com/css?family=Work+Sans:600|Roboto:400,700" rel="stylesheet"> |
| <link href="https://fonts.googleapis.com/css?family=Product+Sans&text=Supported%20by%20Google&display=swap" rel="stylesheet"> |
| <link type="text/css" rel="stylesheet" href="/lib/godoc/style.css"> |
| {{if .SearchBox}} |
| <link rel="search" type="application/opensearchdescription+xml" title="godoc" href="/opensearch.xml" /> |
| {{end}} |
| <script>window.initFuncs = [];</script> |
| {{with .GoogleAnalytics}} |
| <script> |
| 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}} |
| <script src="/lib/godoc/jquery.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> |
| |
| <body class="Site"> |
| <header class="Header js-header"> |
| <div class="Header-banner"> |
| Black Lives Matter. |
| <a href="https://support.eji.org/give/153413/#!/donation/checkout" |
| target="_blank" |
| rel="noopener">Support the Equal Justice Initiative.</a> |
| </div> |
| <nav class="Header-nav {{if .Title}}Header-nav--wide{{end}}"> |
| <a href="/"><img class="Header-logo" src="/lib/godoc/images/go-logo-blue.svg" alt="Go"></a> |
| <button class="Header-menuButton js-headerMenuButton" aria-label="Main menu" aria-expanded="false"> |
| <div class="Header-menuButtonInner"></div> |
| </button> |
| <ul class="Header-menu"> |
| <li class="Header-menuItem"><a href="/doc/">Documents</a></li> |
| <li class="Header-menuItem"><a href="/pkg/">Packages</a></li> |
| <li class="Header-menuItem"><a href="/project/">The Project</a></li> |
| <li class="Header-menuItem"><a href="/help/">Help</a></li> |
| {{if not .GoogleCN}} |
| <li class="Header-menuItem"><a href="/blog/">Blog</a></li> |
| {{if .Playground}} |
| <li class="Header-menuItem"><a href="https://play.golang.org/">Play</a></li> |
| {{end}} |
| {{end}} |
| <li class="Header-menuItem Header-menuItem--search"> |
| <form class="HeaderSearch" role="search" action="/search"> |
| <input class="HeaderSearch-input" |
| type="search" |
| name="q" |
| placeholder="Search" |
| aria-label="Search" |
| autocapitalize="off" |
| autocomplete="off" |
| autocorrect="off" |
| spellcheck="false" |
| required> |
| <button class="HeaderSearch-submit"> |
| <!-- magnifying glass: --><svg class="HeaderSearch-icon" width="24" height="24" viewBox="0 0 24 24"><title>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> |
| </button> |
| </form> |
| </li> |
| </ul> |
| </nav> |
| </header> |
| |
| <main id="page" class="Site-content{{if .Title}} wide{{end}}"> |
| <div class="container"> |
| |
| {{if or .Title .SrcPath}} |
| <h1> |
| {{html .Title}} |
| {{html .SrcPath | srcBreadcrumb}} |
| </h1> |
| {{end}} |
| |
| {{with .Subtitle}} |
| <h2>{{html .}}</h2> |
| {{end}} |
| |
| {{with .SrcPath}} |
| <h2> |
| Documentation: {{html . | srcToPkgLink}} |
| </h2> |
| {{end}} |
| |
| {{/* The Table of Contents is automatically inserted in this <div>. |
| Do not delete this <div>. */}} |
| <div id="nav"></div> |
| |
| {{/* Body is HTML-escaped elsewhere */}} |
| {{printf "%s" .Body}} |
| |
| </div><!-- .container --> |
| </main><!-- #page --> |
| <footer> |
| <div class="Footer {{if .Title}}Footer--wide{{end}}"> |
| <img class="Footer-gopher" src="/lib/godoc/images/footer-gopher.jpg" alt="The Go Gopher"> |
| <ul class="Footer-links"> |
| <li class="Footer-link"><a href="/doc/copyright.html">Copyright</a></li> |
| <li class="Footer-link"><a href="/doc/tos.html">Terms of Service</a></li> |
| <li class="Footer-link"><a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a></li> |
| <li class="Footer-link"><a href="http://golang.org/issues/new?title=x/website:" target="_blank" rel="noopener">Report a website issue</a></li> |
| </ul> |
| <a class="Footer-supportedBy" href="https://google.com">Supported by Google</a> |
| </div> |
| </footer> |
| {{if .GoogleAnalytics}} |
| <script> |
| (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}} |
| |