CINXE.COM
Go 1.14 Release Notes - The Go Programming Language
<!DOCTYPE html> <html lang="en" data-theme="auto"> <head> <link rel="preconnect" href="https://www.googletagmanager.com"> <script >(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-W8MVQXG');</script> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#00add8"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons"> <link rel="stylesheet" href="/css/styles.css"> <link rel="icon" href="/images/favicon-gopher.png" sizes="any"> <link rel="apple-touch-icon" href="/images/favicon-gopher-plain.png"/> <link rel="icon" href="/images/favicon-gopher.svg" type="image/svg+xml"> <link rel="me" href="https://hachyderm.io/@golang"> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-W8MVQXG');</script> <script src="/js/site.js"></script> <meta name="og:url" content="https://go.dev/doc/go1.14"> <meta name="og:title" content="Go 1.14 Release Notes - The Go Programming Language"> <title>Go 1.14 Release Notes - The Go Programming Language</title> <meta name="og:image" content="https://go.dev/doc/gopher/gopher5logo.jpg"> <meta name="twitter:image" content="https://go.dev/doc/gopher/gopherbelly300.jpg"> <meta name="twitter:card" content="summary"> <meta name="twitter:site" content="@golang"> </head> <body class="Site"> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W8MVQXG" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <header class="Site-header js-siteHeader"> <div class="Header Header--dark"> <nav class="Header-nav"> <a href="/"> <img class="js-headerLogo Header-logo" src="/images/go-logo-white.svg" alt="Go"> </a> <div class="skip-navigation-wrapper"> <a class="skip-to-content-link" aria-label="Skip to main content" href="#main-content"> Skip to Main Content </a> </div> <div class="Header-rightContent"> <ul class="Header-menu"> <li class="Header-menuItem "> <a href="#" class="js-desktop-menu-hover" aria-label=Why Go aria-describedby="dropdown-description"> Why Go <i class="material-icons" aria-hidden="true">arrow_drop_down</i> </a> <div class="screen-reader-only" id="dropdown-description" hidden> Press Enter to activate/deactivate dropdown </div> <ul class="Header-submenu js-desktop-submenu-hover" aria-label="submenu"> <li class="Header-submenuItem"> <div> <a href="/solutions/case-studies"> Case Studies </a> </div> <p>Common problems companies solve with Go</p> </li> <li class="Header-submenuItem"> <div> <a href="/solutions/use-cases"> Use Cases </a> </div> <p>Stories about how and why companies use Go</p> </li> <li class="Header-submenuItem"> <div> <a href="/security/"> Security </a> </div> <p>How Go can help keep you secure by default</p> </li> </ul> </li> <li class="Header-menuItem "> <a href="/learn/" aria-label=Learn aria-describedby="dropdown-description"> Learn </a> <div class="screen-reader-only" id="dropdown-description" hidden> Press Enter to activate/deactivate dropdown </div> </li> <li class="Header-menuItem Header-menuItem--active"> <a href="#" class="js-desktop-menu-hover" aria-label=Docs aria-describedby="dropdown-description"> Docs <i class="material-icons" aria-hidden="true">arrow_drop_down</i> </a> <div class="screen-reader-only" id="dropdown-description" hidden> Press Enter to activate/deactivate dropdown </div> <ul class="Header-submenu js-desktop-submenu-hover" aria-label="submenu"> <li class="Header-submenuItem"> <div> <a href="/doc/effective_go"> Effective Go </a> </div> <p>Tips for writing clear, performant, and idiomatic Go code</p> </li> <li class="Header-submenuItem"> <div> <a href="/doc"> Go User Manual </a> </div> <p>A complete introduction to building software with Go</p> </li> <li class="Header-submenuItem"> <div> <a href="https://pkg.go.dev/std"> Standard library </a> </div> <p>Reference documentation for Go's standard library</p> </li> <li class="Header-submenuItem"> <div> <a href="/doc/devel/release"> Release Notes </a> </div> <p>Learn what's new in each Go release</p> </li> </ul> </li> <li class="Header-menuItem "> <a href="https://pkg.go.dev" aria-label=Packages aria-describedby="dropdown-description"> Packages </a> <div class="screen-reader-only" id="dropdown-description" hidden> Press Enter to activate/deactivate dropdown </div> </li> <li class="Header-menuItem "> <a href="#" class="js-desktop-menu-hover" aria-label=Community aria-describedby="dropdown-description"> Community <i class="material-icons" aria-hidden="true">arrow_drop_down</i> </a> <div class="screen-reader-only" id="dropdown-description" hidden> Press Enter to activate/deactivate dropdown </div> <ul class="Header-submenu js-desktop-submenu-hover" aria-label="submenu"> <li class="Header-submenuItem"> <div> <a href="/talks/"> Recorded Talks </a> </div> <p>Videos from prior events</p> </li> <li class="Header-submenuItem"> <div> <a href="https://www.meetup.com/pro/go"> Meetups <i class="material-icons">open_in_new</i> </a> </div> <p>Meet other local Go developers</p> </li> <li class="Header-submenuItem"> <div> <a href="/wiki/Conferences"> Conferences <i class="material-icons">open_in_new</i> </a> </div> <p>Learn and network with Go developers from around the world</p> </li> <li class="Header-submenuItem"> <div> <a href="/blog"> Go blog </a> </div> <p>The Go project's official blog.</p> </li> <li class="Header-submenuItem"> <div> <a href="/help"> Go project </a> </div> <p>Get help and stay informed from Go</p> </li> <li class="Header-submenuItem"> <div> Get connected </div> <p></p> <div class="Header-socialIcons"> <a class="Header-socialIcon" aria-label="Get connected with google-groups (Opens in new window)" href="https://groups.google.com/g/golang-nuts"><img src="/images/logos/social/google-groups.svg" /></a> <a class="Header-socialIcon" aria-label="Get connected with github (Opens in new window)" href="https://github.com/golang"><img src="/images/logos/social/github.svg" /></a> <a class="Header-socialIcon" aria-label="Get connected with twitter (Opens in new window)" href="https://twitter.com/golang"><img src="/images/logos/social/twitter.svg" /></a> <a class="Header-socialIcon" aria-label="Get connected with reddit (Opens in new window)" href="https://www.reddit.com/r/golang/"><img src="/images/logos/social/reddit.svg" /></a> <a class="Header-socialIcon" aria-label="Get connected with slack (Opens in new window)" href="https://invite.slack.golangbridge.org/"><img src="/images/logos/social/slack.svg" /></a> <a class="Header-socialIcon" aria-label="Get connected with stack-overflow (Opens in new window)" href="https://stackoverflow.com/tags/go"><img src="/images/logos/social/stack-overflow.svg" /></a> </div> </li> </ul> </li> </ul> <button class="Header-navOpen js-headerMenuButton Header-navOpen--white" aria-label="Open navigation."> </button> </div> </nav> </div> </header> <aside class="NavigationDrawer js-header"> <nav class="NavigationDrawer-nav"> <div class="NavigationDrawer-header"> <a href="/"> <img class="NavigationDrawer-logo" src="/images/go-logo-blue.svg" alt="Go."> </a> </div> <ul class="NavigationDrawer-list"> <li class="NavigationDrawer-listItem js-mobile-subnav-trigger NavigationDrawer-hasSubnav"> <a href="#"><span>Why Go</span> <i class="material-icons">navigate_next</i></a> <div class="NavigationDrawer NavigationDrawer-submenuItem"> <nav class="NavigationDrawer-nav"> <div class="NavigationDrawer-header"> <a href="#"><i class="material-icons">navigate_before</i>Why Go</a> </div> <ul class="NavigationDrawer-list"> <li class="NavigationDrawer-listItem"> <a href="/solutions/case-studies"> Case Studies </a> </li> <li class="NavigationDrawer-listItem"> <a href="/solutions/use-cases"> Use Cases </a> </li> <li class="NavigationDrawer-listItem"> <a href="/security/"> Security </a> </li> </ul> </div> </div> </li> <li class="NavigationDrawer-listItem "> <a href="/learn/">Learn</a> </li> <li class="NavigationDrawer-listItem js-mobile-subnav-trigger NavigationDrawer-listItem--active NavigationDrawer-hasSubnav"> <a href="#"><span>Docs</span> <i class="material-icons">navigate_next</i></a> <div class="NavigationDrawer NavigationDrawer-submenuItem"> <nav class="NavigationDrawer-nav"> <div class="NavigationDrawer-header"> <a href="#"><i class="material-icons">navigate_before</i>Docs</a> </div> <ul class="NavigationDrawer-list"> <li class="NavigationDrawer-listItem"> <a href="/doc/effective_go"> Effective Go </a> </li> <li class="NavigationDrawer-listItem"> <a href="/doc"> Go User Manual </a> </li> <li class="NavigationDrawer-listItem"> <a href="https://pkg.go.dev/std"> Standard library </a> </li> <li class="NavigationDrawer-listItem"> <a href="/doc/devel/release"> Release Notes </a> </li> </ul> </div> </div> </li> <li class="NavigationDrawer-listItem "> <a href="https://pkg.go.dev">Packages</a> </li> <li class="NavigationDrawer-listItem js-mobile-subnav-trigger NavigationDrawer-hasSubnav"> <a href="#"><span>Community</span> <i class="material-icons">navigate_next</i></a> <div class="NavigationDrawer NavigationDrawer-submenuItem"> <nav class="NavigationDrawer-nav"> <div class="NavigationDrawer-header"> <a href="#"><i class="material-icons">navigate_before</i>Community</a> </div> <ul class="NavigationDrawer-list"> <li class="NavigationDrawer-listItem"> <a href="/talks/"> Recorded Talks </a> </li> <li class="NavigationDrawer-listItem"> <a href="https://www.meetup.com/pro/go"> Meetups <i class="material-icons">open_in_new</i> </a> </li> <li class="NavigationDrawer-listItem"> <a href="/wiki/Conferences"> Conferences <i class="material-icons">open_in_new</i> </a> </li> <li class="NavigationDrawer-listItem"> <a href="/blog"> Go blog </a> </li> <li class="NavigationDrawer-listItem"> <a href="/help"> Go project </a> </li> <li class="NavigationDrawer-listItem"> <div>Get connected</div> <div class="Header-socialIcons"> <a class="Header-socialIcon" href="https://groups.google.com/g/golang-nuts"><img src="/images/logos/social/google-groups.svg" /></a> <a class="Header-socialIcon" href="https://github.com/golang"><img src="/images/logos/social/github.svg" /></a> <a class="Header-socialIcon" href="https://twitter.com/golang"><img src="/images/logos/social/twitter.svg" /></a> <a class="Header-socialIcon" href="https://www.reddit.com/r/golang/"><img src="/images/logos/social/reddit.svg" /></a> <a class="Header-socialIcon" href="https://invite.slack.golangbridge.org/"><img src="/images/logos/social/slack.svg" /></a> <a class="Header-socialIcon" href="https://stackoverflow.com/tags/go"><img src="/images/logos/social/stack-overflow.svg" /></a> </div> </li> </ul> </div> </div> </li> </ul> </nav> </aside> <div class="NavigationDrawer-scrim js-scrim" role="presentation"></div> <main class="SiteContent SiteContent--default" id="main-content"> <article class="Doc Article"> <h1>Go 1.14 Release Notes</h1> <div id="nav" class="TOC"></div> <!-- NOTE: In this document and others in this directory, the convention is to set fixed-width phrases with non-fixed-width spaces, as in `hello` `world`. Do not send CLs removing the interior tags from such phrases. --> <style> main ul li { margin: 0.5em 0; } </style> <h2 id="introduction">Introduction to Go 1.14</h2> <p>The latest Go release, version 1.14, arrives six months after <a href="go1.13">Go 1.13</a>. Most of its changes are in the implementation of the toolchain, runtime, and libraries. As always, the release maintains the Go 1 <a href="/doc/go1compat.html">promise of compatibility</a>. We expect almost all Go programs to continue to compile and run as before.</p> <p>Module support in the <code>go</code> command is now ready for production use, and we encourage all users to <a href="/blog/migrating-to-go-modules">migrate to Go modules for dependency management</a>. If you are unable to migrate due to a problem in the Go toolchain, please ensure that the problem has an <a href="/issue?q=is%3Aissue+is%3Aopen+label%3Amodules">open issue</a> filed. (If the issue is not on the <code>Go1.15</code> milestone, please let us know why it prevents you from migrating so that we can prioritize it appropriately.)</p> <h2 id="language">Changes to the language</h2> <p>Per the <a href="https://github.com/golang/proposal/blob/master/design/6977-overlapping-interfaces.md" rel="noreferrer" target="_blank">overlapping interfaces proposal</a>, Go 1.14 now permits embedding of interfaces with overlapping method sets: methods from an embedded interface may have the same names and identical signatures as methods already present in the (embedding) interface. This solves problems that typically (but not exclusively) occur with diamond-shaped embedding graphs. Explicitly declared methods in an interface must remain <a href="https://tip.golang.org/ref/spec#Uniqueness_of_identifiers" rel="noreferrer" target="_blank">unique</a>, as before.</p> <h2 id="ports">Ports</h2> <h3 id="darwin">Darwin</h3> <p>Go 1.14 is the last release that will run on macOS 10.11 El Capitan. Go 1.15 will require macOS 10.12 Sierra or later.</p> <!-- golang.org/issue/34749 --> <p>Go 1.14 is the last Go release to support 32-bit binaries on macOS (the <code>darwin/386</code> port). They are no longer supported by macOS, starting with macOS 10.15 (Catalina). Go continues to support the 64-bit <code>darwin/amd64</code> port.</p> <!-- golang.org/issue/34751 --> <p>Go 1.14 will likely be the last Go release to support 32-bit binaries on iOS, iPadOS, watchOS, and tvOS (the <code>darwin/arm</code> port). Go continues to support the 64-bit <code>darwin/arm64</code> port.</p> <h3 id="windows">Windows</h3> <!-- CL 203601 --> <p>Go binaries on Windows now have <a href="https://docs.microsoft.com/en-us/windows/win32/memory/data-execution-prevention" rel="noreferrer" target="_blank">DEP (Data Execution Prevention)</a> enabled.</p> <!-- CL 202439 --> <p>On Windows, creating a file via <a href="/pkg/os#CreateFile"><code>os.OpenFile</code></a> with the <a href="/pkg/os/#O_CREATE"><code>os.O_CREATE</code></a> flag, or via <a href="/pkg/syscall#Open"><code>syscall.Open</code></a> with the <a href="/pkg/syscall#O_CREAT"><code>syscall.O_CREAT</code></a> flag, will now create the file as read-only if the bit <code>0o200</code> (owner write permission) is not set in the permission argument. This makes the behavior on Windows more like that on Unix systems.</p> <h3 id="wasm">WebAssembly</h3> <!-- CL 203600 --> <p>JavaScript values referenced from Go via <code>js.Value</code> objects can now be garbage collected.</p> <!-- CL 203600 --> <p><code>js.Value</code> values can no longer be compared using the <code>==</code> operator, and instead must be compared using their <code>Equal</code> method.</p> <!-- CL 203600 --> <p><code>js.Value</code> now has <code>IsUndefined</code>, <code>IsNull</code>, and <code>IsNaN</code> methods.</p> <h3 id="riscv">RISC-V</h3> <!-- Issue 27532 --> <p>Go 1.14 contains experimental support for 64-bit RISC-V on Linux (<code>GOOS=linux</code>, <code>GOARCH=riscv64</code>). Be aware that performance, assembly syntax stability, and possibly correctness are a work in progress.</p> <h3 id="freebsd">FreeBSD</h3> <!-- CL 199919 --> <p>Go now supports the 64-bit ARM architecture on FreeBSD 12.0 or later (the <code>freebsd/arm64</code> port).</p> <h3 id="nacl">Native Client (NaCl)</h3> <!-- golang.org/issue/30439 --> <p>As <a href="go1.13#ports">announced</a> in the Go 1.13 release notes, Go 1.14 drops support for the Native Client platform (<code>GOOS=nacl</code>).</p> <h3 id="illumos">Illumos</h3> <!-- CL 203758 --> <p>The runtime now respects zone CPU caps (the <code>zone.cpu-cap</code> resource control) for <code>runtime.NumCPU</code> and the default value of <code>GOMAXPROCS</code>.</p> <h2 id="tools">Tools</h2> <h3 id="go-command">Go command</h3> <h4 id="vendor">Vendoring</h4> <!-- golang.org/issue/33848 --> <p>When the main module contains a top-level <code>vendor</code> directory and its <code>go.mod</code> file specifies <code>go</code> <code>1.14</code> or higher, the <code>go</code> command now defaults to <code>-mod=vendor</code> for operations that accept that flag. A new value for that flag, <code>-mod=mod</code>, causes the <code>go</code> command to instead load modules from the module cache (as when no <code>vendor</code> directory is present).</p> <p>When <code>-mod=vendor</code> is set (explicitly or by default), the <code>go</code> command now verifies that the main module’s <code>vendor/modules.txt</code> file is consistent with its <code>go.mod</code> file.</p> <p><code>go</code> <code>list</code> <code>-m</code> no longer silently omits transitive dependencies that do not provide packages in the <code>vendor</code> directory. It now fails explicitly if <code>-mod=vendor</code> is set and information is requested for a module not mentioned in <code>vendor/modules.txt</code>.</p> <h4 id="go-flags">Flags</h4> <!-- golang.org/issue/32502, golang.org/issue/30345 --> <p>The <code>go</code> <code>get</code> command no longer accepts the <code>-mod</code> flag. Previously, the flag’s setting either <a href="/issue/30345">was ignored</a> or <a href="/issue/32502">caused the build to fail</a>.</p> <!-- golang.org/issue/33326 --> <p><code>-mod=readonly</code> is now set by default when the <code>go.mod</code> file is read-only and no top-level <code>vendor</code> directory is present.</p> <!-- golang.org/issue/31481 --> <p><code>-modcacherw</code> is a new flag that instructs the <code>go</code> command to leave newly-created directories in the module cache at their default permissions rather than making them read-only. The use of this flag makes it more likely that tests or other tools will accidentally add files not included in the module’s verified checksum. However, it allows the use of <code>rm</code> <code>-rf</code> (instead of <code>go</code> <code>clean</code> <code>-modcache</code>) to remove the module cache.</p> <!-- golang.org/issue/34506 --> <p><code>-modfile=file</code> is a new flag that instructs the <code>go</code> command to read (and possibly write) an alternate <code>go.mod</code> file instead of the one in the module root directory. A file named <code>go.mod</code> must still be present in order to determine the module root directory, but it is not accessed. When <code>-modfile</code> is specified, an alternate <code>go.sum</code> file is also used: its path is derived from the <code>-modfile</code> flag by trimming the <code>.mod</code> extension and appending <code>.sum</code>.</p> <h4 id="go-env-vars">Environment variables</h4> <!-- golang.org/issue/32966 --> <p><code>GOINSECURE</code> is a new environment variable that instructs the <code>go</code> command to not require an HTTPS connection, and to skip certificate validation, when fetching certain modules directly from their origins. Like the existing <code>GOPRIVATE</code> variable, the value of <code>GOINSECURE</code> is a comma-separated list of glob patterns.</p> <h4 id="commands-outside-modules">Commands outside modules</h4> <!-- golang.org/issue/32027 --> <p>When module-aware mode is enabled explicitly (by setting <code>GO111MODULE=on</code>), most module commands have more limited functionality if no <code>go.mod</code> file is present. For example, <code>go</code> <code>build</code>, <code>go</code> <code>run</code>, and other build commands can only build packages in the standard library and packages specified as <code>.go</code> files on the command line.</p> <p>Previously, the <code>go</code> command would resolve each package path to the latest version of a module but would not record the module path or version. This resulted in <a href="/issue/32027">slow, non-reproducible builds</a>.</p> <p><code>go</code> <code>get</code> continues to work as before, as do <code>go</code> <code>mod</code> <code>download</code> and <code>go</code> <code>list</code> <code>-m</code> with explicit versions.</p> <h4 id="incompatible-versions"><code>+incompatible</code> versions</h4> <!-- golang.org/issue/34165 --> <p>If the latest version of a module contains a <code>go.mod</code> file, <code>go</code> <code>get</code> will no longer upgrade to an <a href="/cmd/go/#hdr-Module_compatibility_and_semantic_versioning">incompatible</a> major version of that module unless such a version is requested explicitly or is already required. <code>go</code> <code>list</code> also omits incompatible major versions for such a module when fetching directly from version control, but may include them if reported by a proxy.</p> <h4 id="go.mod"><code>go.mod</code> file maintenance</h4> <!-- golang.org/issue/34822 --> <p><code>go</code> commands other than <code>go</code> <code>mod</code> <code>tidy</code> no longer remove a <code>require</code> directive that specifies a version of an indirect dependency that is already implied by other (transitive) dependencies of the main module.</p> <p><code>go</code> commands other than <code>go</code> <code>mod</code> <code>tidy</code> no longer edit the <code>go.mod</code> file if the changes are only cosmetic.</p> <p>When <code>-mod=readonly</code> is set, <code>go</code> commands will no longer fail due to a missing <code>go</code> directive or an erroneous <code>//聽indirect</code> comment.</p> <h4 id="module-downloading">Module downloading</h4> <!-- golang.org/issue/26092 --> <p>The <code>go</code> command now supports Subversion repositories in module mode.</p> <!-- golang.org/issue/30748 --> <p>The <code>go</code> command now includes snippets of plain-text error messages from module proxies and other HTTP servers. An error message will only be shown if it is valid UTF-8 and consists of only graphic characters and spaces.</p> <h4 id="go-test">Testing</h4> <!-- golang.org/issue/24929 --> <p><code>go test -v</code> now streams <code>t.Log</code> output as it happens, rather than at the end of all tests.</p> <h2 id="runtime">Runtime</h2> <!-- CL 190098 --> <p>This release improves the performance of most uses of <code>defer</code> to incur almost zero overhead compared to calling the deferred function directly. As a result, <code>defer</code> can now be used in performance-critical code without overhead concerns.</p> <!-- CL 201760, CL 201762 and many others --> <p>Goroutines are now asynchronously preemptible. As a result, loops without function calls no longer potentially deadlock the scheduler or significantly delay garbage collection. This is supported on all platforms except <code>windows/arm</code>, <code>darwin/arm</code>, <code>js/wasm</code>, and <code>plan9/*</code>.</p> <p>A consequence of the implementation of preemption is that on Unix systems, including Linux and macOS systems, programs built with Go 1.14 will receive more signals than programs built with earlier releases. This means that programs that use packages like <a href="/pkg/syscall/"><code>syscall</code></a> or <a href="https://godoc.org/golang.org/x/sys/unix" rel="noreferrer" target="_blank"><code>golang.org/x/sys/unix</code></a> will see more slow system calls fail with <code>EINTR</code> errors. Those programs will have to handle those errors in some way, most likely looping to try the system call again. For more information about this see <a href="https://man7.org/linux/man-pages/man7/signal.7.html" rel="noreferrer" target="_blank"><code>man 7 signal</code></a> for Linux systems or similar documentation for other systems.</p> <!-- CL 201765, CL 195701 and many others --> <p>The page allocator is more efficient and incurs significantly less lock contention at high values of <code>GOMAXPROCS</code>. This is most noticeable as lower latency and higher throughput for large allocations being done in parallel and at a high rate.</p> <!-- CL 171844 and many others --> <p>Internal timers, used by <a href="/pkg/time/#After"><code>time.After</code></a>, <a href="/pkg/time/#Tick"><code>time.Tick</code></a>, <a href="/pkg/net/#Conn"><code>net.Conn.SetDeadline</code></a>, and friends, are more efficient, with less lock contention and fewer context switches. This is a performance improvement that should not cause any user visible changes.</p> <h2 id="compiler">Compiler</h2> <!-- CL 162237 --> <p>This release adds <code>-d=checkptr</code> as a compile-time option for adding instrumentation to check that Go code is following <code>unsafe.Pointer</code> safety rules dynamically. This option is enabled by default (except on Windows) with the <code>-race</code> or <code>-msan</code> flags, and can be disabled with <code>-gcflags=all=-d=checkptr=0</code>. Specifically, <code>-d=checkptr</code> checks the following:</p> <ol> <li>When converting <code>unsafe.Pointer</code> to <code>*T</code>, the resulting pointer must be aligned appropriately for <code>T</code>.</li> <li>If the result of pointer arithmetic points into a Go heap object, one of the <code>unsafe.Pointer</code>-typed operands must point into the same object.</li> </ol> <p>Using <code>-d=checkptr</code> is not currently recommended on Windows because it causes false alerts in the standard library.</p> <!-- CL 204338 --> <p>The compiler can now emit machine-readable logs of key optimizations using the <code>-json</code> flag, including inlining, escape analysis, bounds-check elimination, and nil-check elimination.</p> <!-- CL 196959 --> <p>Detailed escape analysis diagnostics (<code>-m=2</code>) now work again. This had been dropped from the new escape analysis implementation in the previous release.</p> <!-- CL 196217 --> <p>All Go symbols in macOS binaries now begin with an underscore, following platform conventions.</p> <!-- CL 202117 --> <p>This release includes experimental support for compiler-inserted coverage instrumentation for fuzzing. See <a href="/issue/14565">issue 14565</a> for more details. This API may change in future releases.</p> <!-- CL 174704 --> <!-- CL 196784 --> <p>Bounds check elimination now uses information from slice creation and can eliminate checks for indexes with types smaller than <code>int</code>.</p> <h2 id="library">Standard library</h2> <h3 id="hash_maphash">New byte sequence hashing package</h3> <!-- golang.org/issue/28322, CL 186877 --> <p>Go 1.14 includes a new package, <a href="/pkg/hash/maphash/"><code>hash/maphash</code></a>, which provides hash functions on byte sequences. These hash functions are intended to be used to implement hash tables or other data structures that need to map arbitrary strings or byte sequences to a uniform distribution on unsigned 64-bit integers.</p> <p>The hash functions are collision-resistant but not cryptographically secure.</p> <p>The hash value of a given byte sequence is consistent within a single process, but will be different in different processes.</p> <h3 id="minor_library_changes">Minor changes to the library</h3> <p>As always, there are various minor changes and updates to the library, made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a> in mind.</p> <h4 id="cryptotlspkgcryptotls"><a href="/pkg/crypto/tls/">crypto/tls</a></h4> <!-- CL 191976 --> <p>Support for SSL version 3.0 (SSLv3) has been removed. Note that SSLv3 is the <a href="https://tools.ietf.org/html/rfc7568" rel="noreferrer" target="_blank">cryptographically broken</a> protocol predating TLS.</p> <!-- CL 191999 --> <p>TLS 1.3 can’t be disabled via the <code>GODEBUG</code> environment variable anymore. Use the <a href="/pkg/crypto/tls/#Config.MaxVersion"><code>Config.MaxVersion</code></a> field to configure TLS versions.</p> <!-- CL 205059 --> <p>When multiple certificate chains are provided through the <a href="/pkg/crypto/tls/#Config.Certificates"><code>Config.Certificates</code></a> field, the first one compatible with the peer is now automatically selected. This allows for example providing an ECDSA and an RSA certificate, and letting the package automatically select the best one. Note that the performance of this selection is going to be poor unless the <a href="/pkg/crypto/tls/#Certificate.Leaf"><code>Certificate.Leaf</code></a> field is set. The <a href="/pkg/crypto/tls/#Config.NameToCertificate"><code>Config.NameToCertificate</code></a> field, which only supports associating a single certificate with a give name, is now deprecated and should be left as <code>nil</code>. Similarly the <a href="/pkg/crypto/tls/#Config.BuildNameToCertificate"><code>Config.BuildNameToCertificate</code></a> method, which builds the <code>NameToCertificate</code> field from the leaf certificates, is now deprecated and should not be called.</p> <!-- CL 175517 --> <p>The new <a href="/pkg/crypto/tls/#CipherSuites"><code>CipherSuites</code></a> and <a href="/pkg/crypto/tls/#InsecureCipherSuites"><code>InsecureCipherSuites</code></a> functions return a list of currently implemented cipher suites. The new <a href="/pkg/crypto/tls/#CipherSuiteName"><code>CipherSuiteName</code></a> function returns a name for a cipher suite ID.</p> <!-- CL 205058, 205057 --> <p>The new <a href="/pkg/crypto/tls/#ClientHelloInfo.SupportsCertificate"> <code>(*ClientHelloInfo).SupportsCertificate</code></a> and <a href="/pkg/crypto/tls/#CertificateRequestInfo.SupportsCertificate"> <code>(*CertificateRequestInfo).SupportsCertificate</code></a> methods expose whether a peer supports a certain certificate.</p> <!-- CL 174329 --> <p>The <code>tls</code> package no longer supports the legacy Next Protocol Negotiation (NPN) extension and now only supports ALPN. In previous releases it supported both. There are no API changes and applications should function identically as before. Most other clients and servers have already removed NPN support in favor of the standardized ALPN.</p> <!-- CL 205063, 205062 --> <p>RSA-PSS signatures are now used when supported in TLS 1.2 handshakes. This won’t affect most applications, but custom <a href="/pkg/crypto/tls/#Certificate.PrivateKey"><code>Certificate.PrivateKey</code></a> implementations that don’t support RSA-PSS signatures will need to use the new <a href="/pkg/crypto/tls/#Certificate.SupportedSignatureAlgorithms"> <code>Certificate.SupportedSignatureAlgorithms</code></a> field to disable them.</p> <!-- CL 205059, 205059 --> <p><a href="/pkg/crypto/tls/#Config.Certificates"><code>Config.Certificates</code></a> and <a href="/pkg/crypto/tls/#Config.GetCertificate"><code>Config.GetCertificate</code></a> can now both be nil if <a href="/pkg/crypto/tls/#Config.GetConfigForClient"><code>Config.GetConfigForClient</code></a> is set. If the callbacks return neither certificates nor an error, the <code>unrecognized_name</code> is now sent.</p> <!-- CL 205058 --> <p>The new <a href="/pkg/crypto/tls/#CertificateRequestInfo.Version"><code>CertificateRequestInfo.Version</code></a> field provides the TLS version to client certificates callbacks.</p> <!-- CL 205068 --> <p>The new <code>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</code> and <code>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256</code> constants use the final names for the cipher suites previously referred to as <code>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305</code> and <code>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305</code>.</p> <!-- crypto/tls --> <h4 id="cryptox509pkgcryptox509"><a href="/pkg/crypto/x509/">crypto/x509</a></h4> <!-- CL 204046 --> <p><a href="/pkg/crypto/x509/#Certificate.CreateCRL"><code>Certificate.CreateCRL</code></a> now supports Ed25519 issuers.</p> <h4 id="debugdwarfpkgdebugdwarf"><a href="/pkg/debug/dwarf/">debug/dwarf</a></h4> <!-- CL 175138 --> <p>The <code>debug/dwarf</code> package now supports reading DWARF version 5.</p> <p>The new method <a href="/pkg/debug/dwarf/#Data.AddSection"><code>(*Data).AddSection</code></a> supports adding arbitrary new DWARF sections from the input file to the DWARF <code>Data</code>.</p> <!-- CL 192698 --> <p>The new method <a href="/pkg/debug/dwarf/#Reader.ByteOrder"><code>(*Reader).ByteOrder</code></a> returns the byte order of the current compilation unit. This may be used to interpret attributes that are encoded in the native ordering, such as location descriptions.</p> <!-- CL 192699 --> <p>The new method <a href="/pkg/debug/dwarf/#LineReader.Files"><code>(*LineReader).Files</code></a> returns the file name table from a line reader. This may be used to interpret the value of DWARF attributes such as <code>AttrDeclFile</code>.</p> <!-- debug/dwarf --> <h4 id="encodingasn1pkgencodingasn1"><a href="/pkg/encoding/asn1/">encoding/asn1</a></h4> <!-- CL 126624 --> <p><a href="/pkg/encoding/asn1/#Unmarshal"><code>Unmarshal</code></a> now supports ASN.1 string type BMPString, represented by the new <a href="/pkg/encoding/asn1/#TagBMPString"><code>TagBMPString</code></a> constant.</p> <!-- encoding/asn1 --> <h4 id="encodingjsonpkgencodingjson"><a href="/pkg/encoding/json/">encoding/json</a></h4> <!-- CL 200677 --> <p>The <a href="/pkg/encoding/json/#Decoder"><code>Decoder</code></a> type supports a new method <a href="/pkg/encoding/json/#Decoder.InputOffset"><code>InputOffset</code></a> that returns the input stream byte offset of the current decoder position.</p> <!-- CL 200217 --> <p><a href="/pkg/encoding/json/#Compact"><code>Compact</code></a> no longer escapes the <code>U+2028</code> and <code>U+2029</code> characters, which was never a documented feature. For proper escaping, see <a href="/pkg/encoding/json/#HTMLEscape"><code>HTMLEscape</code></a>.</p> <!-- CL 195045 --> <p><a href="/pkg/encoding/json/#Number"><code>Number</code></a> no longer accepts invalid numbers, to follow the documented behavior more closely. If a program needs to accept invalid numbers like the empty string, consider wrapping the type with <a href="/pkg/encoding/json/#Unmarshaler"><code>Unmarshaler</code></a>.</p> <!-- CL 200237 --> <p><a href="/pkg/encoding/json/#Unmarshal"><code>Unmarshal</code></a> can now support map keys with string underlying type which implement <a href="/pkg/encoding/#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>.</p> <!-- encoding/json --> <h4 id="gobuildpkggobuild"><a href="/pkg/go/build/">go/build</a></h4> <!-- CL 203820, 211657 --> <p>The <a href="/pkg/go/build/#Context"><code>Context</code></a> type has a new field <code>Dir</code> which may be used to set the working directory for the build. The default is the current directory of the running process. In module mode, this is used to locate the main module.</p> <!-- go/build --> <h4 id="godocpkggodoc"><a href="/pkg/go/doc/">go/doc</a></h4> <!-- CL 204830 --> <p>The new function <a href="/pkg/go/doc/#NewFromFiles"><code>NewFromFiles</code></a> computes package documentation from a list of <code>*ast.File</code>’s and associates examples with the appropriate package elements. The new information is available in a new <code>Examples</code> field in the <a href="/pkg/go/doc/#Package"><code>Package</code></a>, <a href="/pkg/go/doc/#Type"><code>Type</code></a>, and <a href="/pkg/go/doc/#Func"><code>Func</code></a> types, and a new <a href="/pkg/go/doc/#Example.Suffix"><code>Suffix</code></a> field in the <a href="/pkg/go/doc/#Example"><code>Example</code></a> type.</p> <!-- go/doc --> <h4 id="ioioutilpkgioioutil"><a href="/pkg/io/ioutil/">io/ioutil</a></h4> <!-- CL 198488 --> <p><a href="/pkg/io/ioutil/#TempDir"><code>TempDir</code></a> can now create directories whose names have predictable prefixes and suffixes. As with <a href="/pkg/io/ioutil/#TempFile"><code>TempFile</code></a>, if the pattern contains a ‘*’, the random string replaces the last ‘*’.</p> <h4 id="logpkglog"><a href="/pkg/log/">log</a></h4> <!-- CL 186182 --> <p>The new <a href="https://tip.golang.org/pkg/log/#pkg-constants" rel="noreferrer" target="_blank"><code>Lmsgprefix</code></a> flag may be used to tell the logging functions to emit the optional output prefix immediately before the log message rather than at the start of the line.</p> <!-- log --> <h4 id="mathpkgmath"><a href="/pkg/math/">math</a></h4> <!-- CL 127458 --> <p>The new <a href="/pkg/math/#FMA"><code>FMA</code></a> function computes <code>x*y+z</code> in floating point with no intermediate rounding of the <code>x*y</code> computation. Several architectures implement this computation using dedicated hardware instructions for additional performance.</p> <!-- math --> <h4 id="mathbigpkgmathbig"><a href="/pkg/math/big/">math/big</a></h4> <!-- CL 164972 --> <p>The <a href="/pkg/math/big/#Int.GCD"><code>GCD</code></a> method now allows the inputs <code>a</code> and <code>b</code> to be zero or negative.</p> <!-- math/big --> <h4 id="mathbitspkgmathbits"><a href="/pkg/math/bits/">math/bits</a></h4> <!-- CL 197838 --> <p>The new functions <a href="/pkg/math/bits/#Rem"><code>Rem</code></a>, <a href="/pkg/math/bits/#Rem32"><code>Rem32</code></a>, and <a href="/pkg/math/bits/#Rem64"><code>Rem64</code></a> support computing a remainder even when the quotient overflows.</p> <!-- math/bits --> <h4 id="mimepkgmime"><a href="/pkg/mime/">mime</a></h4> <!-- CL 186927 --> <p>The default type of <code>.js</code> and <code>.mjs</code> files is now <code>text/javascript</code> rather than <code>application/javascript</code>. This is in accordance with <a href="https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/" rel="noreferrer" target="_blank">an IETF draft</a> that treats <code>application/javascript</code> as obsolete.</p> <!-- mime --> <h4 id="mimemultipartpkgmimemultipart"><a href="/pkg/mime/multipart/">mime/multipart</a></h4> <p>The new <a href="/pkg/mime/multipart/#Reader"><code>Reader</code></a> method <a href="/pkg/mime/multipart/#Reader.NextRawPart"><code>NextRawPart</code></a> supports fetching the next MIME part without transparently decoding <code>quoted-printable</code> data.</p> <!-- mime/multipart --> <h4 id="nethttppkgnethttp"><a href="/pkg/net/http/">net/http</a></h4> <!-- CL 200760 --> <p>The new <a href="/pkg/net/http/#Header"><code>Header</code></a> method <a href="/pkg/net/http/#Header.Values"><code>Values</code></a> can be used to fetch all values associated with a canonicalized key.</p> <!-- CL 61291 --> <p>The new <a href="/pkg/net/http/#Transport"><code>Transport</code></a> field <a href="/pkg/net/http/#Transport.DialTLSContext"><code>DialTLSContext</code></a> can be used to specify an optional dial function for creating TLS connections for non-proxied HTTPS requests. This new field can be used instead of <a href="/pkg/net/http/#Transport.DialTLS"><code>DialTLS</code></a>, which is now considered deprecated; <code>DialTLS</code> will continue to work, but new code should use <code>DialTLSContext</code>, which allows the transport to cancel dials as soon as they are no longer needed.</p> <!-- CL 192518, CL 194218 --> <p>On Windows, <a href="/pkg/net/http/#ServeFile"><code>ServeFile</code></a> now correctly serves files larger than 2GB.</p> <!-- net/http --> <h4 id="nethttphttptestpkgnethttphttptest"><a href="/pkg/net/http/httptest/">net/http/httptest</a></h4> <!-- CL 201557 --> <p>The new <a href="/pkg/net/http/httptest/#Server"><code>Server</code></a> field <a href="/pkg/net/http/httptest/#Server.EnableHTTP2"><code>EnableHTTP2</code></a> supports enabling HTTP/2 on the test server.</p> <!-- net/http/httptest --> <h4 id="nettextprotopkgnettextproto"><a href="/pkg/net/textproto/">net/textproto</a></h4> <!-- CL 200760 --> <p>The new <a href="/pkg/net/textproto/#MIMEHeader"><code>MIMEHeader</code></a> method <a href="/pkg/net/textproto/#MIMEHeader.Values"><code>Values</code></a> can be used to fetch all values associated with a canonicalized key.</p> <!-- net/textproto --> <h4 id="neturlpkgneturl"><a href="/pkg/net/url/">net/url</a></h4> <!-- CL 185117 --> <p>When parsing of a URL fails (for example by <a href="/pkg/net/url/#Parse"><code>Parse</code></a> or <a href="/pkg/net/url/#ParseRequestURI"><code>ParseRequestURI</code></a>), the resulting <a href="/pkg/net/url/#Error.Error"><code>Error</code></a> message will now quote the unparsable URL. This provides clearer structure and consistency with other parsing errors.</p> <!-- net/url --> <h4 id="ossignalpkgossignal"><a href="/pkg/os/signal/">os/signal</a></h4> <!-- CL 187739 --> <p>On Windows, the <code>CTRL_CLOSE_EVENT</code>, <code>CTRL_LOGOFF_EVENT</code>, and <code>CTRL_SHUTDOWN_EVENT</code> events now generate a <code>syscall.SIGTERM</code> signal, similar to how Control-C and Control-Break generate a <code>syscall.SIGINT</code> signal.</p> <!-- os/signal --> <h4 id="pluginpkgplugin"><a href="/pkg/plugin/">plugin</a></h4> <!-- CL 191617 --> <p>The <code>plugin</code> package now supports <code>freebsd/amd64</code>.</p> <!-- plugin --> <h4 id="reflectpkgreflect"><a href="/pkg/reflect/">reflect</a></h4> <!-- CL 85661 --> <p><a href="/pkg/reflect#StructOf"><code>StructOf</code></a> now supports creating struct types with unexported fields, by setting the <code>PkgPath</code> field in a <code>StructField</code> element.</p> <!-- reflect --> <h4 id="runtimepkgruntime"><a href="/pkg/runtime/">runtime</a></h4> <!-- CL 200081 --> <p><code>runtime.Goexit</code> can no longer be aborted by a recursive <code>panic</code>/<code>recover</code>.</p> <!-- CL 188297, CL 191785 --> <p>On macOS, <code>SIGPIPE</code> is no longer forwarded to signal handlers installed before the Go runtime is initialized. This is necessary because macOS delivers <code>SIGPIPE</code> <a href="/issue/33384">to the main thread</a> rather than the thread writing to the closed pipe.</p> <!-- runtime --> <h4 id="runtimepprofpkgruntimepprof"><a href="/pkg/runtime/pprof/">runtime/pprof</a></h4> <!-- CL 204636, 205097 --> <p>The generated profile no longer includes the pseudo-PCs used for inline marks. Symbol information of inlined functions is encoded in <a href="https://github.com/google/pprof/blob/5e96527/proto/profile.proto#L177-L184" rel="noreferrer" target="_blank">the format</a> the pprof tool expects. This is a fix for the regression introduced during recent releases.</p> <!-- runtime/pprof --> <h4 id="strconvpkgstrconv"><a href="/pkg/strconv/">strconv</a></h4> <p>The <a href="/pkg/strconv/#NumError"><code>NumError</code></a> type now has an <a href="/pkg/strconv/#NumError.Unwrap"><code>Unwrap</code></a> method that may be used to retrieve the reason that a conversion failed. This supports using <code>NumError</code> values with <a href="/pkg/errors/#Is"><code>errors.Is</code></a> to see if the underlying error is <a href="/pkg/strconv/#pkg-variables"><code>strconv.ErrRange</code></a> or <a href="/pkg/strconv/#pkg-variables"><code>strconv.ErrSyntax</code></a>.</p> <!-- strconv --> <h4 id="syncpkgsync"><a href="/pkg/sync/">sync</a></h4> <!-- CL 200577 --> <p>Unlocking a highly contended <code>Mutex</code> now directly yields the CPU to the next goroutine waiting for that <code>Mutex</code>. This significantly improves the performance of highly contended mutexes on high CPU count machines.</p> <!-- sync --> <h4 id="testingpkgtesting"><a href="/pkg/testing/">testing</a></h4> <!-- CL 201359 --> <p>The testing package now supports cleanup functions, called after a test or benchmark has finished, by calling <a href="/pkg/testing#T.Cleanup"><code>T.Cleanup</code></a> or <a href="/pkg/testing#B.Cleanup"><code>B.Cleanup</code></a> respectively.</p> <!-- testing --> <h4 id="texttemplatepkgtexttemplate"><a href="/pkg/text/template/">text/template</a></h4> <!-- CL 206124 --> <p>The text/template package now correctly reports errors when a parenthesized argument is used as a function. This most commonly shows up in erroneous cases like <code>{{if (eq .F "a") or (eq .F "b")}}</code>. This should be written as <code>{{if or (eq .F "a") (eq .F "b")}}</code>. The erroneous case never worked as expected, and will now be reported with an error <code>can't give argument to non-function</code>.</p> <!-- CL 207637 --> <p><a href="/pkg/text/template/#JSEscape"><code>JSEscape</code></a> now escapes the <code>&</code> and <code>=</code> characters to mitigate the impact of its output being misused in HTML contexts.</p> <!-- text/template --> <h4 id="unicodepkgunicode"><a href="/pkg/unicode/">unicode</a></h4> <p>The <a href="/pkg/unicode/"><code>unicode</code></a> package and associated support throughout the system has been upgraded from Unicode 11.0 to <a href="https://www.unicode.org/versions/Unicode12.0.0/" rel="noreferrer" target="_blank">Unicode 12.0</a>, which adds 554 new characters, including four new scripts, and 61 new emoji.</p> <!-- unicode --> </article> </main> <footer class="Site-footer"> <div class="Footer"> <div class="Container"> <div class="Footer-links"> <div class="Footer-linkColumn"> <a href="/solutions/" class="Footer-link Footer-link--primary" aria-describedby="footer-description"> Why Go </a> <a href="/solutions/use-cases" class="Footer-link" aria-describedby="footer-description"> Use Cases </a> <a href="/solutions/case-studies" class="Footer-link" aria-describedby="footer-description"> Case Studies </a> </div> <div class="Footer-linkColumn"> <a href="/learn/" class="Footer-link Footer-link--primary" aria-describedby="footer-description"> Get Started </a> <a href="/play" class="Footer-link" aria-describedby="footer-description"> Playground </a> <a href="/tour/" class="Footer-link" aria-describedby="footer-description"> Tour </a> <a href="https://stackoverflow.com/questions/tagged/go?tab=Newest" class="Footer-link" aria-describedby="footer-description"> Stack Overflow </a> <a href="/help/" class="Footer-link" aria-describedby="footer-description"> Help </a> </div> <div class="Footer-linkColumn"> <a href="https://pkg.go.dev" class="Footer-link Footer-link--primary" aria-describedby="footer-description"> Packages </a> <a href="/pkg/" class="Footer-link" aria-describedby="footer-description"> Standard Library </a> <a href="https://pkg.go.dev/about" class="Footer-link" aria-describedby="footer-description"> About Go Packages </a> </div> <div class="Footer-linkColumn"> <a href="/project" class="Footer-link Footer-link--primary" aria-describedby="footer-description"> About </a> <a href="/dl/" class="Footer-link" aria-describedby="footer-description"> Download </a> <a href="/blog/" class="Footer-link" aria-describedby="footer-description"> Blog </a> <a href="https://github.com/golang/go/issues" class="Footer-link" aria-describedby="footer-description"> Issue Tracker </a> <a href="/doc/devel/release" class="Footer-link" aria-describedby="footer-description"> Release Notes </a> <a href="/brand" class="Footer-link" aria-describedby="footer-description"> Brand Guidelines </a> <a href="/conduct" class="Footer-link" aria-describedby="footer-description"> Code of Conduct </a> </div> <div class="Footer-linkColumn"> <a href="https://www.twitter.com/golang" class="Footer-link Footer-link--primary" aria-describedby="footer-description"> Connect </a> <a href="https://www.twitter.com/golang" class="Footer-link" aria-describedby="footer-description"> Twitter </a> <a href="https://github.com/golang" class="Footer-link" aria-describedby="footer-description"> GitHub </a> <a href="https://invite.slack.golangbridge.org/" class="Footer-link" aria-describedby="footer-description"> Slack </a> <a href="https://reddit.com/r/golang" class="Footer-link" aria-describedby="footer-description"> r/golang </a> <a href="https://www.meetup.com/pro/go" class="Footer-link" aria-describedby="footer-description"> Meetup </a> <a href="https://golangweekly.com/" class="Footer-link" aria-describedby="footer-description"> Golang Weekly </a> </div> </div> </div> </div> <div class="screen-reader-only" id="footer-description" hidden> Opens in new window. </div> <div class="Footer"> <div class="Container Container--fullBleed"> <div class="Footer-bottom"> <img class="Footer-gopher" src="/images/gophers/pilot-bust.svg" alt="The Go Gopher"> <ul class="Footer-listRow"> <li class="Footer-listItem"> <a href="/copyright" aria-describedby="footer-description">Copyright</a> </li> <li class="Footer-listItem"> <a href="/tos" aria-describedby="footer-description">Terms of Service</a> </li> <li class="Footer-listItem"> <a href="http://www.google.com/intl/en/policies/privacy/" aria-describedby="footer-description" target="_blank" rel="noopener"> Privacy Policy </a> </li> <li class="Footer-listItem"> <a href="/s/website-issue" aria-describedby="footer-description" target="_blank" rel="noopener" > Report an Issue </a> </li> <li class="Footer-listItem go-Footer-listItem"> <button class="go-Button go-Button--text go-Footer-toggleTheme js-toggleTheme" aria-label="Toggle theme"> <img data-value="auto" class="go-Icon go-Icon--inverted" height="24" width="24" src="/images/icons/brightness_6_gm_grey_24dp.svg" alt="System theme"> <img data-value="dark" class="go-Icon go-Icon--inverted" height="24" width="24" src="/images/icons/brightness_2_gm_grey_24dp.svg" alt="Dark theme"> <img data-value="light" class="go-Icon go-Icon--inverted" height="24" width="24" src="/images/icons/light_mode_gm_grey_24dp.svg" alt="Light theme"> </button> </li> </ul> <a class="Footer-googleLogo" target="_blank" href="https://google.com" rel="noopener"> <img class="Footer-googleLogoImg" src="/images/google-white.png" alt="Google logo"> </a> </div> </div> </div> <script src="/js/jquery.js"></script> <script src="/js/carousels.js"></script> <script src="/js/searchBox.js"></script> <script src="/js/misc.js"></script> <script src="/js/hats.js"></script> <script src="/js/playground.js"></script> <script src="/js/godocs.js"></script> <script async src="/js/copypaste.js"></script> </footer> <section class="Cookie-notice js-cookieNotice"> <div>go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. <a target=_blank href="https://policies.google.com/technologies/cookies">Learn more.</a></div> <div><button class="go-Button">Okay</button></div> </section> </body> </html>