blob: 757aa46311ac7f19cbc6e13420fac5b22014caf4 [file] [log] [blame]
<!--
Copyright 2019 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="Description" content="Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.">
<meta class="js-gtmID" data-gtmid="{{.GoogleTagManagerID}}">
<link href="https://fonts.googleapis.com/css?family=Work+Sans:600|Roboto:400,500,700|Source+Code+Pro" rel="stylesheet">
<link href="/static/css/stylesheet.css?version={{.AppVersionLabel}}" rel="stylesheet">
{{if (.Experiments.IsActive "sidenav")}}
<link href="/static/css/sidenav.css?version={{.AppVersionLabel}}" rel="stylesheet">
{{end}}
{{block "main_content_stylesheet" .}}{{end}}
<link href="/third_party/dialog-polyfill/dialog-polyfill.css?version={{.AppVersionLabel}}" rel="stylesheet">
<title>{{if .HTMLTitle}}{{.HTMLTitle}} · {{end}}pkg.go.dev</title>
<body class="Site">
<header class="Site-header Site-header--dark">
<div class="Banner">
<div class="Banner-inner">
<div class="Banner-message">Black Lives Matter</div>
<a class="Banner-action"
href="https://support.eji.org/give/153413/#!/donation/checkout"
target="_blank"
rel="noopener">Support the Equal Justice Initiative</a>
</div>
</div>
<div class="Header">
<nav class="Header-nav">
<a href="https://go.dev/" class="Header-logoLink">
<img class="Header-logo" src="/static/img/go-logo-white.svg" alt="Go">
</a>
{{template "header_search" .}}
<ul class="Header-menu">
<li class="Header-menuItem">
<a href="https://go.dev/solutions" title="Why Go">Why Go</a>
</li>
<li class="Header-menuItem">
<a href="https://learn.go.dev" title="Getting Started">Getting Started</a>
</li>
<li class="Header-menuItem Header-menuItem--active">
<a href="/" title="Discover Packages">Discover Packages</a>
</li>
<li class="Header-menuItem">
<a href="https://go.dev/about" title="">About</a>
</li>
</ul>
<button class="Header-navOpen js-headerMenuButton" aria-label="Open navigation.">
</button>
</nav>
</div>
</header>
<aside class="NavigationDrawer js-header">
<nav class="NavigationDrawer-nav">
<div class="NavigationDrawer-header">
<a href="https://go.dev/">
<img class="NavigationDrawer-logo" src="/static/img/go-logo-blue.svg" alt="Go.">
</a>
<button class="NavigationDrawer-close js-headerMenuButton" aria-label="Close navigation.">
</button>
</div>
<ul class="NavigationDrawer-list">
<li class="NavigationDrawer-listItem">
<a href="https://go.dev/solutions" title="Why Go">Why Go</a>
</li>
<li class="NavigationDrawer-listItem">
<a href="https://learn.go.dev" title="Getting Started">Getting Started</a>
</li>
<li class="NavigationDrawer-listItem NavigationDrawer-listItem--active">
<a href="/" title="Discover Packages">Discover Packages</a>
</li>
<li class="NavigationDrawer-listItem">
<a href="https://go.dev/about" title="">About</a>
</li>
<li class="NavigationDrawer-listItem">
<a href="https://golang.org" title="golang.org">golang.org</a>
</li>
</ul>
</nav>
</aside>
<div class="NavigationDrawer-scrim js-scrim" role="presentation">
</div>
<main class="Site-content">{{block "main_content" .}}{{end}}</main>
<footer class="Site-footer">
{{block "pre_footer" .}}{{end}}
<div class="Footer">
<div class="Footer-links">
<div class="Footer-linkColumn">
<a href="https://go.dev/solutions" class="Footer-link Footer-link--primary" title="Why Go">
Why Go
</a>
<a href="https://go.dev/solutions#use-cases" class="Footer-link" title="Use Cases">
Use Cases
</a>
<a href="https://go.dev/solutions#case-studies" class="Footer-link" title="Case Studies">
Case Studies
</a>
</div>
<div class="Footer-linkColumn">
<a href="https://learn.go.dev/" class="Footer-link Footer-link--primary" title="Getting Started">
Getting Started
</a>
<a href="https://play.golang.org" class="Footer-link" title="">
Playground
</a>
<a href="https://tour.golang.org" class="Footer-link" title="">
Tour
</a>
<a href="https://stackoverflow.com/questions/tagged/go?tab=Newest" class="Footer-link" title="">
Stack Overflow
</a>
</div>
<div class="Footer-linkColumn">
<a href="https://pkg.go.dev" class="Footer-link Footer-link--primary" title="Discover Packages">
Discover Packages
</a>
</div>
<div class="Footer-linkColumn">
<a href="https://go.dev/about" class="Footer-link Footer-link--primary" title="About">
About
</a>
<a href="https://golang.org/dl/" class="Footer-link" title="">
Download
</a>
<a href="https://blog.golang.org" class="Footer-link" title="">
Blog
</a>
<a href="https://golang.org/doc/devel/release.html" class="Footer-link" title="">
Release Notes
</a>
<a href="https://blog.golang.org/go-brand" class="Footer-link" title="">
Brand Guidelines
</a>
<a href="https://golang.org/conduct" class="Footer-link">
Code of Conduct
</a>
</div>
<div class="Footer-linkColumn">
<a href="https://www.twitter.com/golang" class="Footer-link Footer-link--primary" title="Connect">
Connect
</a>
<a href="https://www.twitter.com/golang" class="Footer-link" title="">
Twitter
</a>
<a href="https://github.com/golang" class="Footer-link" title="">
GitHub
</a>
<a href="https://invite.slack.golangbridge.org/" class="Footer-link" title="">
Slack
</a>
<a href="https://www.meetup.com/pro/go" class="Footer-link" title="">
Meetup
</a>
</div>
</div>
</div>
<div class="Footer">
<div class="Container Container--fullBleed">
<div class="Footer-bottom">
<img class="Footer-gopher" loading="lazy" src="/static/img/pilot-bust.svg" alt="The Go Gopher">
<ul class="Footer-listRow">
<li class="Footer-listItem"><a href="https://go.dev/copyright">Copyright</a></li>
<li class="Footer-listItem"><a href="https://go.dev/tos">Terms of Service</a></li>
<li class="Footer-listItem"><a href="http://www.google.com/intl/en/policies/privacy/" target="_blank" rel="noopener">Privacy
Policy</a></li>
<li class="Footer-listItem">
<a href="https://golang.org/s/pkgsite-feedback" target="_blank" rel="noopener">
Report an Issue
</a>
</li>
<li class="Footer-listItem"><a href="https://golang.org" target="_blank" rel="noopener">golang.org</a></li>
</ul>
<a class="Footer-googleLogo" href="https://google.com" target="_blank" rel="noopener">
<img class="Footer-googleLogoImg" loading="lazy" src="/static/img/google-white.png" alt="Google logo">
</a>
</div>
</div>
</div>
</footer>
<script>
function loadScript(src) {
let s = document.createElement("script");
s.src = src;
document.head.appendChild(s);
}
loadScript("/static/js/base.min.js");
</script>
{{block "post_content" .}}{{end}}
{{if not .DevMode}}
<script async>
const gtmId = document.querySelector('.js-gtmID').dataset.gtmid; // this will throw if the querySelector can’t find the element
if (!gtmId) {
throw new Error('Google Tag Manager ID not found');
}
loadScript(`https://www.googletagmanager.com/gtm.js?id=${gtmId}`);
</script>
{{end}}
{{if (.Experiments.IsActive "autocomplete")}}
<script>
loadScript("/third_party/autoComplete.js/autoComplete.min.js");
loadScript("/static/js/completion.min.js");
</script>
{{end}}