CINXE.COM

builtin package - builtin - Go Packages

<!DOCTYPE html> <html lang="en" data-layout="responsive" data-local=""> <head> <script> window.addEventListener('error', window.__err=function f(e){f.p=f.p||[];f.p.push(e)}); </script> <script> (function() { const theme = document.cookie.match(/prefers-color-scheme=(light|dark|auto)/)?.[1] if (theme) { document.querySelector('html').setAttribute('data-theme', theme); } }()) </script> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="Description" content="Package builtin provides documentation for Go&#39;s predeclared identifiers."> <meta class="js-gtmID" data-gtmid="GTM-W8MVQXG"> <link rel="shortcut icon" href="/static/shared/icon/favicon.ico"> <link rel="canonical" href="https://pkg.go.dev/builtin"> <link href="/static/frontend/frontend.min.css?version=prod-frontend-00090-vzc" rel="stylesheet"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Go Packages"> <title>builtin package - builtin - Go Packages</title> <link href="/static/frontend/unit/unit.min.css?version=prod-frontend-00090-vzc" rel="stylesheet"> <link href="/static/frontend/unit/main/main.min.css?version=prod-frontend-00090-vzc" rel="stylesheet"> </head> <body> <script> function loadScript(src, mod = true) { let s = document.createElement('script'); s.src = src; if (mod) { s.type = 'module'; s.async = true; s.defer = true } document.head.appendChild(s); } loadScript("/third_party/dialog-polyfill/dialog-polyfill.js", false) loadScript("/static/frontend/frontend.js"); </script> <header class="go-Header go-Header--full js-siteHeader"> <div class="go-Header-inner go-Header-inner--dark"> <nav class="go-Header-nav"> <a href="https://go.dev/" class="js-headerLogo" data-gtmc="nav link" data-test-id="go-header-logo-link" role="heading" aria-level="1"> <img class="go-Header-logo" src="/static/shared/logo/go-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="go-Header-rightContent"> <div class="go-SearchForm js-searchForm"> <form class="go-InputGroup go-ShortcutKey go-SearchForm-form" action="/search" data-shortcut="/" data-shortcut-alt="search" data-gtmc="search form" aria-label="Search for a package" role="search" > <input name="q" class="go-Input js-searchFocus" aria-label="Search for a package" type="search" autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false" placeholder="Search packages or symbols" value="" /> <input name="m" value="" hidden> <button class="go-Button go-Button--inverted" aria-label="Submit search"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/search_gm_grey_24dp.svg" alt="" /> </button> </form> <button class="go-SearchForm-expandSearch js-expandSearch" data-gtmc="nav button" aria-label="Open search" data-test-id="expand-search"> <img class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/search_gm_grey_24dp.svg" alt=""> </button> </div> <ul class="go-Header-menu"> <li class="go-Header-menuItem"> <a class="js-desktop-menu-hover" href="#" data-gtmc="nav link"> Why Go <img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_drop_down_gm_grey_24dp.svg" alt="submenu dropdown icon"> </a> <ul class="go-Header-submenu go-Header-submenu--why js-desktop-submenu-hover" aria-label="submenu"> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/solutions#case-studies"> </span>Case Studies</span> </a> </div> <p>Common problems companies solve with Go</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/solutions#use-cases"> </span>Use Cases</span> </a> </div> <p>Stories about how and why companies use Go</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/security/policy/"> </span>Security Policy</span> </a> </div> <p>How Go can help keep you secure by default</p> </li> </ul> </li> <li class="go-Header-menuItem"> <a href="https://go.dev/learn/" data-gtmc="nav link">Learn</a> </li> <li class="go-Header-menuItem"> <a class="js-desktop-menu-hover" href="#" data-gtmc="nav link"> Docs <img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_drop_down_gm_grey_24dp.svg" alt="submenu dropdown icon"> </a> <ul class="go-Header-submenu go-Header-submenu--docs js-desktop-submenu-hover" aria-label="submenu"> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/doc/effective_go"> <span>Effective Go</span> </a> </div> <p>Tips for writing clear, performant, and idiomatic Go code</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/doc/"> <span>Go User Manual</span> </a> </div> <p>A complete introduction to building software with Go</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://pkg.go.dev/std"> <span>Standard library</span> </a> </div> <p>Reference documentation for Go's standard library</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/doc/devel/release"> <span>Release Notes</span> </a> </div> <p>Learn what's new in each Go release</p> </li> </ul> </li> <li class="go-Header-menuItem go-Header-menuItem--active"> <a href="/" data-gtmc="nav link">Packages</a> </li> <li class="go-Header-menuItem"> <a class="js-desktop-menu-hover" href="#" data-gtmc="nav link"> Community <img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_drop_down_gm_grey_24dp.svg" alt="submenu dropdown icon"> </a> <ul class="go-Header-submenu go-Header-submenu--community js-desktop-submenu-hover" aria-label="submenu"> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/talks/"> <span>Recorded Talks</span> </a> </div> <p>Videos from prior events</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://www.meetup.com/pro/go"> <span>Meetups</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </div> <p>Meet other local Go developers</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://github.com/golang/go/wiki/Conferences"> <span>Conferences</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </div> <p>Learn and network with Go developers from around the world</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/blog"> <span>Go blog</span> </a> </div> <p>The Go project's official blog.</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/help"> <span>Go project</span> </a> </div> <p>Get help and stay informed from Go</p> </li> <li class="go-Header-submenuItem"> <div> Get connected </div> <p></p> <div class="go-Header-socialIcons"> <a class="go-Header-socialIcon" aria-label="Get connected with google-groups (Opens in new window)" href="https://groups.google.com/g/golang-nuts" ><img src="/static/shared/logo/social/google-groups.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with github (Opens in new window)" href="https://github.com/golang"><img src="/static/shared/logo/social/github.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with twitter (Opens in new window)" href="https://twitter.com/golang"><img src="/static/shared/logo/social/twitter.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with reddit (Opens in new window)" href="https://www.reddit.com/r/golang/"><img src="/static/shared/logo/social/reddit.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with slack (Opens in new window)" href="https://invite.slack.golangbridge.org/"><img src="/static/shared/logo/social/slack.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with stack-overflow (Opens in new window)" href="https://stackoverflow.com/collectives/go"><img src="/static/shared/logo/social/stack-overflow.svg" /></a> </div> </li> </ul> </li> </ul> <button class="go-Header-navOpen js-headerMenuButton go-Header-navOpen--white" data-gtmc="nav button" aria-label="Open navigation"> </button> </div> </nav> </div> </header> <aside class="go-NavigationDrawer js-header"> <nav class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="https://go.dev/"> <img class="go-NavigationDrawer-logo" src="/static/shared/logo/go-blue.svg" alt="Go."> </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem js-mobile-subnav-trigger go-NavigationDrawer-hasSubnav"> <a href="#"> <span>Why Go</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_next_gm_grey_24dp.svg" alt=""> </i> </a> <div class="go-NavigationDrawer go-NavigationDrawer-submenuItem"> <div class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="#"> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_before_gm_grey_24dp.svg" alt=""> </i> Why Go </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/solutions#case-studies"> Case Studies </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/solutions#use-cases"> Use Cases </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/security/policy/"> Security Policy </a> </li> </ul> </div> </div> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/learn/">Learn</a> </li> <li class="go-NavigationDrawer-listItem js-mobile-subnav-trigger go-NavigationDrawer-hasSubnav"> <a href="#"> <span>Docs</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_next_gm_grey_24dp.svg" alt=""> </i> </a> <div class="go-NavigationDrawer go-NavigationDrawer-submenuItem"> <div class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="#"><i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_before_gm_grey_24dp.svg" alt=""> </i> Docs </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/doc/effective_go"> Effective Go </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/doc/"> Go User Manual </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://pkg.go.dev/std"> Standard library </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/doc/devel/release"> Release Notes </a> </li> </ul> </div> </div> </li> <li class="go-NavigationDrawer-listItem go-NavigationDrawer-listItem--active"> <a href="/">Packages</a> </li> <li class="go-NavigationDrawer-listItem js-mobile-subnav-trigger go-NavigationDrawer-hasSubnav"> <a href="#"> <span>Community</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_next_gm_grey_24dp.svg" alt=""> </i> </a> <div class="go-NavigationDrawer go-NavigationDrawer-submenuItem"> <div class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="#"> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_before_gm_grey_24dp.svg" alt=""> </i> Community </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/talks/"> Recorded Talks </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://www.meetup.com/pro/go"> Meetups <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://github.com/golang/go/wiki/Conferences"> Conferences <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/blog"> Go blog </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/help"> Go project </a> </li> <li class="go-NavigationDrawer-listItem"> <div>Get connected</div> <div class="go-Header-socialIcons"> <a class="go-Header-socialIcon" href="https://groups.google.com/g/golang-nuts"><img src="/static/shared/logo/social/google-groups.svg" /></a> <a class="go-Header-socialIcon" href="https://github.com/golang"><img src="/static/shared/logo/social/github.svg" /></a> <a class="go-Header-socialIcon" href="https://twitter.com/golang"><img src="/static/shared/logo/social/twitter.svg" /></a> <a class="go-Header-socialIcon" href="https://www.reddit.com/r/golang/"><img src="/static/shared/logo/social/reddit.svg" /></a> <a class="go-Header-socialIcon" href="https://invite.slack.golangbridge.org/"><img src="/static/shared/logo/social/slack.svg" /></a> <a class="go-Header-socialIcon" href="https://stackoverflow.com/collectives/go"><img src="/static/shared/logo/social/stack-overflow.svg" /></a> </div> </li> </ul> </div> </div> </li> </ul> </nav> </aside> <div class="go-NavigationDrawer-scrim js-scrim" role="presentation"></div> <main class="go-Main" id="main-content"> <div class="go-Main-banner" role="alert"></div> <header class="go-Main-header js-mainHeader"> <nav class="go-Main-headerBreadcrumb go-Breadcrumb" aria-label="Breadcrumb" data-test-id="UnitHeader-breadcrumb"> <ol> <li data-test-id="UnitHeader-breadcrumbItem"> <a href="/" data-gtmc="breadcrumb link">Discover Packages</a> </li> <li data-test-id="UnitHeader-breadcrumbItem"> <a href="/std" data-gtmc="breadcrumb link">Standard library</a> </li> <li> <a href="/builtin@go1.23.3" data-gtmc="breadcrumb link" aria-current="location" data-test-id="UnitHeader-breadcrumbCurrent"> builtin </a> <button class="go-Button go-Button--inline go-Clipboard js-clipboard" title="Copy path to clipboard.&#10;&#10;builtin" aria-label="Copy Path to Clipboard" data-to-copy="builtin" data-gtmc="breadcrumbs button" > <img class="go-Icon go-Icon--accented" height="24" width="24" src="/static/shared/icon/content_copy_gm_grey_24dp.svg" alt="" > </button> </li> </ol> </nav> <div class="go-Main-headerContent"> <div class="go-Main-headerTitle js-stickyHeader"> <a class="go-Main-headerLogo" href="https://go.dev/" aria-hidden="true" tabindex="-1" data-gtmc="header link" aria-label="Link to Go Homepage"> <img height="78" width="207" src="/static/shared/logo/go-blue.svg" alt="Go"> </a> <h1 class="UnitHeader-titleHeading" data-test-id="UnitHeader-title">builtin</h1> <span class="go-Chip go-Chip--inverted">package</span> <span class="go-Chip go-Chip--inverted">standard library</span> <button class="go-Button go-Button--inline go-Clipboard js-clipboard" title="Copy path to clipboard.&#10;&#10;builtin" aria-label="Copy Path to Clipboard" data-to-copy="builtin" data-gtmc="title button" tabindex="-1" > <img class="go-Icon go-Icon--accented" height="24" width="24" src="/static/shared/icon/content_copy_gm_grey_24dp.svg" alt="" /> </button> </div> <div class="go-Main-headerDetails"> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-version"> <a href="?tab=versions" aria-label="Version: go1.23.3" data-gtmc="header link" aria-describedby="version-description"> <span class="go-textSubtle" aria-hidden="true">Version: </span> go1.23.3 </a> <div class="screen-reader-only" id="version-description" hidden> Opens a new window with list of versions in this module. </div> <span class="DetailsHeader-badge--latest" data-test-id="UnitHeader-minorVersionBanner"> <span class="go-Chip DetailsHeader-span--latest">Latest</span> <span class="go-Chip DetailsHeader-span--notAtLatest"> Latest <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary> <img class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/alert_gm_grey_24dp.svg" alt="Warning"> </summary> <p>This package is not in the latest version of its module.</p> </details> </span> <a href="/builtin" aria-label="Go to Latest Version" data-gtmc="header link"> <span class="go-Chip go-Chip--alert DetailsHeader-span--goToLatest">Go to latest</span> </a> </span> </span> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-commitTime"> Published: Nov 6, 2024 </span> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-licenses"> License: <a href="/builtin?tab=licenses" data-test-id="UnitHeader-license" data-gtmc="header link" aria-describedby="license-description">BSD-3-Clause</a> </span> <div class="screen-reader-only" id="license-description" hidden> Opens a new window with license information. </div> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-imports"> <a href="/builtin?tab=imports" aria-label="Imports: 1" data-gtmc="header link" aria-describedby="imports-description"> <span class="go-textSubtle">Imports: </span>1 </a> </span> <div class="screen-reader-only" id="imports-description" hidden> Opens a new window with list of imports. </div> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-importedby"> <a href="/builtin?tab=importedby" aria-label="Imported By: 0" data-gtmc="header link" aria-describedby="importedby-description"> <span class="go-textSubtle">Imported by: </span>0 </a> </span> <div class="screen-reader-only" id="importedby-description" hidden> Opens a new window with list of known importers. </div> </div> <div class="UnitHeader-overflowContainer"> <svg class="UnitHeader-overflowImage" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"> <path d="M0 0h24v24H0z" fill="none"/> <path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/> </svg> <select class="UnitHeader-overflowSelect js-selectNav" tabindex="-1"> <option value="/">Main</option> <option value="/builtin?tab=versions"> Versions </option> <option value="/builtin?tab=licenses"> Licenses </option> <option value="/builtin?tab=imports"> Imports </option> <option value="/builtin?tab=importedby"> Imported By </option> </select> </div> </div> </header> <aside class="go-Main-aside js-mainAside"> <div class="UnitMeta"> <h2 class="go-textLabel">Details</h2> <ul class="UnitMeta-details"> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Valid <a href="https://cs.opensource.google/go/go/+/go1.23.3:src/go.mod" target="_blank" rel="noopener">go.mod</a> file <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p> The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go. </p> </details> </li> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Redistributable license <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p> Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed. </p> </details> </li> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Tagged version <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p>Modules with tagged versions give importers more predictable builds.</p> </details> </li> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Stable version <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p>When a project reaches major version v1 it is considered stable.</p> </details> </li> <li class="UnitMeta-detailsLearn"> <a href="/about#best-practices" data-gtmc="meta link">Learn more about best practices</a> </li> </ul> <h2 class="go-textLabel">Repository</h2> <div class="UnitMeta-repo"> <a href="https://cs.opensource.google/go/go" title="https://cs.opensource.google/go/go" target="_blank" rel="noopener"> cs.opensource.google/go/go </a> </div> <h2 class="go-textLabel">Links</h2> <ul class="UnitMeta-links"> <li> <a href="https://go.dev/security/policy" title="Report security issues in the Go standard library and sub-repositories"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/security_grey_24dp.svg" alt=""> Report a Vulnerability </a> </li> </ul> </div> </aside> <nav class="go-Main-nav go-Main-nav--sticky js-mainNav" aria-label="Outline"> <div class="go-Main-navDesktop"> <div class="UnitOutline-jumpTo"> <button class="UnitOutline-jumpToInput go-ShortcutKey js-jumpToInput" aria-controls="jump-to-modal" aria-label="Open Jump to Identifier" data-shortcut="f" data-shortcut-alt="find" data-test-id="jump-to-button" data-gtmc="outline button"> Jump to ... </button> </div> <ul class="go-Tree js-tree" role="tree" aria-label="Outline"> <li> <a href="#section-documentation" data-gtmc="outline link"> Documentation </a> <ul> <li> <a href="#pkg-overview" data-gtmc="doc outline link">Overview</a> </li> <li class="DocNav-overview"> <a href="#pkg-index" data-gtmc="doc outline link"> Index </a> </li> <li class="DocNav-constants"> <a href="#pkg-constants" data-gtmc="doc outline link"> Constants </a> </li> <li class="DocNav-variables"> <a href="#pkg-variables" data-gtmc="doc outline link"> Variables </a> </li> <li class="DocNav-functions"> <a href="#pkg-functions" data-gtmc="doc outline link"> Functions </a> <ul> <li> <a href="#append" title="append(slice, elems)" data-gtmc="doc outline link"> append(slice, elems) </a> </li> <li> <a href="#cap" title="cap(v)" data-gtmc="doc outline link"> cap(v) </a> </li> <li> <a href="#clear" title="clear(t)" data-gtmc="doc outline link"> clear(t) </a> </li> <li> <a href="#close" title="close(c)" data-gtmc="doc outline link"> close(c) </a> </li> <li> <a href="#complex" title="complex(r, i)" data-gtmc="doc outline link"> complex(r, i) </a> </li> <li> <a href="#copy" title="copy(dst, src)" data-gtmc="doc outline link"> copy(dst, src) </a> </li> <li> <a href="#delete" title="delete(m, key)" data-gtmc="doc outline link"> delete(m, key) </a> </li> <li> <a href="#imag" title="imag(c)" data-gtmc="doc outline link"> imag(c) </a> </li> <li> <a href="#len" title="len(v)" data-gtmc="doc outline link"> len(v) </a> </li> <li> <a href="#make" title="make(t, size)" data-gtmc="doc outline link"> make(t, size) </a> </li> <li> <a href="#max" title="max(x, y)" data-gtmc="doc outline link"> max(x, y) </a> </li> <li> <a href="#min" title="min(x, y)" data-gtmc="doc outline link"> min(x, y) </a> </li> <li> <a href="#new" title="new()" data-gtmc="doc outline link"> new() </a> </li> <li> <a href="#panic" title="panic(v)" data-gtmc="doc outline link"> panic(v) </a> </li> <li> <a href="#print" title="print(args)" data-gtmc="doc outline link"> print(args) </a> </li> <li> <a href="#println" title="println(args)" data-gtmc="doc outline link"> println(args) </a> </li> <li> <a href="#real" title="real(c)" data-gtmc="doc outline link"> real(c) </a> </li> <li> <a href="#recover" title="recover()" data-gtmc="doc outline link"> recover() </a> </li> </ul> </li> <li class="DocNav-types"> <a href="#pkg-types" data-gtmc="doc outline link"> Types </a> <ul> <li> <a href="#ComplexType" title="type ComplexType" data-gtmc="doc outline link"> type ComplexType </a> </li> <li> <a href="#FloatType" title="type FloatType" data-gtmc="doc outline link"> type FloatType </a> </li> <li> <a href="#IntegerType" title="type IntegerType" data-gtmc="doc outline link"> type IntegerType </a> </li> <li> <a href="#Type" title="type Type" data-gtmc="doc outline link"> type Type </a> </li> <li> <a href="#Type1" title="type Type1" data-gtmc="doc outline link"> type Type1 </a> </li> <li> <a href="#any" title="type any" data-gtmc="doc outline link"> type any </a> </li> <li> <a href="#bool" title="type bool" data-gtmc="doc outline link"> type bool </a> </li> <li> <a href="#byte" title="type byte" data-gtmc="doc outline link"> type byte </a> </li> <li> <a href="#comparable" title="type comparable" data-gtmc="doc outline link"> type comparable </a> </li> <li> <a href="#complex128" title="type complex128" data-gtmc="doc outline link"> type complex128 </a> </li> <li> <a href="#complex64" title="type complex64" data-gtmc="doc outline link"> type complex64 </a> </li> <li> <a href="#error" title="type error" data-gtmc="doc outline link"> type error </a> </li> <li> <a href="#float32" title="type float32" data-gtmc="doc outline link"> type float32 </a> </li> <li> <a href="#float64" title="type float64" data-gtmc="doc outline link"> type float64 </a> </li> <li> <a href="#int" title="type int" data-gtmc="doc outline link"> type int </a> </li> <li> <a href="#int16" title="type int16" data-gtmc="doc outline link"> type int16 </a> </li> <li> <a href="#int32" title="type int32" data-gtmc="doc outline link"> type int32 </a> </li> <li> <a href="#int64" title="type int64" data-gtmc="doc outline link"> type int64 </a> </li> <li> <a href="#int8" title="type int8" data-gtmc="doc outline link"> type int8 </a> </li> <li> <a href="#rune" title="type rune" data-gtmc="doc outline link"> type rune </a> </li> <li> <a href="#string" title="type string" data-gtmc="doc outline link"> type string </a> </li> <li> <a href="#uint" title="type uint" data-gtmc="doc outline link"> type uint </a> </li> <li> <a href="#uint16" title="type uint16" data-gtmc="doc outline link"> type uint16 </a> </li> <li> <a href="#uint32" title="type uint32" data-gtmc="doc outline link"> type uint32 </a> </li> <li> <a href="#uint64" title="type uint64" data-gtmc="doc outline link"> type uint64 </a> </li> <li> <a href="#uint8" title="type uint8" data-gtmc="doc outline link"> type uint8 </a> </li> <li> <a href="#uintptr" title="type uintptr" data-gtmc="doc outline link"> type uintptr </a> </li> </ul> </li> </ul> </li> <li> <a href="#section-sourcefiles" data-gtmc="outline link"> Source Files </a> </li> </ul> </div> <div class="go-Main-navMobile js-mainNavMobile"> <label class="go-Label"> <select class="go-Select"> <option selected disabled>Documentation</option> </select> </label> </div> </nav> <article class="go-Main-article js-mainContent"> <div class="UnitDetails" data-test-id="UnitDetails" style="display: block;"> <div class="UnitDetails-content js-unitDetailsContent" data-test-id="UnitDetails-content"> <div class="UnitDoc"> <h2 class="UnitDoc-title" id="section-documentation"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/code_gm_grey_24dp.svg" alt=""> Documentation <a class="UnitDoc-idLink" href="#section-documentation" aria-label="Go to Documentation">露</a> </h2> <div class="Documentation js-documentation"> <div class="Documentation-content js-docContent"> <section class="Documentation-overview"> <h3 tabindex="-1" id="pkg-overview" class="Documentation-overviewHeader">Overview <a href="#pkg-overview" aria-label="Go to Overview">露</a></h3> <p>Package builtin provides documentation for Go&#39;s predeclared identifiers. The items documented here are not actually in package builtin but their descriptions here allow godoc to present documentation for the language&#39;s special identifiers. </p> </section><section class="Documentation-index"> <h3 id="pkg-index" class="Documentation-indexHeader">Index <a href="#pkg-index" aria-label="Go to Index">露</a></h3> <ul class="Documentation-indexList"> <li class="Documentation-indexConstants"><a href="#pkg-constants">Constants</a></li> <li class="Documentation-indexVariables"><a href="#pkg-variables">Variables</a></li> <li class="Documentation-indexFunction"> <a href="#append">func append(slice []Type, elems ...Type) []Type</a></li> <li class="Documentation-indexFunction"> <a href="#cap">func cap(v Type) int</a></li> <li class="Documentation-indexFunction"> <a href="#clear">func clear[T ~[]Type | ~map[Type]Type1](t T)</a></li> <li class="Documentation-indexFunction"> <a href="#close">func close(c chan&lt;- Type)</a></li> <li class="Documentation-indexFunction"> <a href="#complex">func complex(r, i FloatType) ComplexType</a></li> <li class="Documentation-indexFunction"> <a href="#copy">func copy(dst, src []Type) int</a></li> <li class="Documentation-indexFunction"> <a href="#delete">func delete(m map[Type]Type1, key Type)</a></li> <li class="Documentation-indexFunction"> <a href="#imag">func imag(c ComplexType) FloatType</a></li> <li class="Documentation-indexFunction"> <a href="#len">func len(v Type) int</a></li> <li class="Documentation-indexFunction"> <a href="#make">func make(t Type, size ...IntegerType) Type</a></li> <li class="Documentation-indexFunction"> <a href="#max">func max[T cmp.Ordered](x T, y ...T) T</a></li> <li class="Documentation-indexFunction"> <a href="#min">func min[T cmp.Ordered](x T, y ...T) T</a></li> <li class="Documentation-indexFunction"> <a href="#new">func new(Type) *Type</a></li> <li class="Documentation-indexFunction"> <a href="#panic">func panic(v any)</a></li> <li class="Documentation-indexFunction"> <a href="#print">func print(args ...Type)</a></li> <li class="Documentation-indexFunction"> <a href="#println">func println(args ...Type)</a></li> <li class="Documentation-indexFunction"> <a href="#real">func real(c ComplexType) FloatType</a></li> <li class="Documentation-indexFunction"> <a href="#recover">func recover() any</a></li> <li class="Documentation-indexType"> <a href="#ComplexType">type ComplexType</a></li> <li class="Documentation-indexType"> <a href="#FloatType">type FloatType</a></li> <li class="Documentation-indexType"> <a href="#IntegerType">type IntegerType</a></li> <li class="Documentation-indexType"> <a href="#Type">type Type</a></li> <li class="Documentation-indexType"> <a href="#Type1">type Type1</a></li> <li class="Documentation-indexType"> <a href="#any">type any</a></li> <li class="Documentation-indexType"> <a href="#bool">type bool</a></li> <li class="Documentation-indexType"> <a href="#byte">type byte</a></li> <li class="Documentation-indexType"> <a href="#comparable">type comparable</a></li> <li class="Documentation-indexType"> <a href="#complex128">type complex128</a></li> <li class="Documentation-indexType"> <a href="#complex64">type complex64</a></li> <li class="Documentation-indexType"> <a href="#error">type error</a></li> <li class="Documentation-indexType"> <a href="#float32">type float32</a></li> <li class="Documentation-indexType"> <a href="#float64">type float64</a></li> <li class="Documentation-indexType"> <a href="#int">type int</a></li> <li class="Documentation-indexType"> <a href="#int16">type int16</a></li> <li class="Documentation-indexType"> <a href="#int32">type int32</a></li> <li class="Documentation-indexType"> <a href="#int64">type int64</a></li> <li class="Documentation-indexType"> <a href="#int8">type int8</a></li> <li class="Documentation-indexType"> <a href="#rune">type rune</a></li> <li class="Documentation-indexType"> <a href="#string">type string</a></li> <li class="Documentation-indexType"> <a href="#uint">type uint</a></li> <li class="Documentation-indexType"> <a href="#uint16">type uint16</a></li> <li class="Documentation-indexType"> <a href="#uint32">type uint32</a></li> <li class="Documentation-indexType"> <a href="#uint64">type uint64</a></li> <li class="Documentation-indexType"> <a href="#uint8">type uint8</a></li> <li class="Documentation-indexType"> <a href="#uintptr">type uintptr</a></li> </ul> </section><h3 tabindex="-1" id="pkg-constants" class="Documentation-constantsHeader">Constants <a href="#pkg-constants" aria-label="Go to Constants">露</a></h3> <section class="Documentation-constants"> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=19">View Source</a></span> <pre>const ( <span id="true" data-kind="constant"> true = 0 == 0 <span class="comment">// Untyped bool.</span> </span><span id="false" data-kind="constant"> false = 0 != 0 <span class="comment">// Untyped bool.</span> </span>)</pre> </div> <p>true and false are the two untyped boolean values. </p> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=109">View Source</a></span> <pre><span id="iota" data-kind="constant">const iota = 0 <span class="comment">// Untyped int.</span> </span></pre> </div> <p>iota is a predeclared identifier representing the untyped integer ordinal number of the current const specification in a (usually parenthesized) const declaration. It is zero-indexed. </p> </section> <h3 tabindex="-1" id="pkg-variables" class="Documentation-variablesHeader">Variables <a href="#pkg-variables" aria-label="Go to Variables">露</a></h3> <section class="Documentation-variables"> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=113">View Source</a></span> <pre><span id="nil" data-kind="variable">var nil <a href="#Type">Type</a> <span class="comment">// Type must be a pointer, channel, func, interface, map, or slice type</span> </span></pre> </div> <p>nil is a predeclared identifier representing the zero value for a pointer, channel, func, interface, map, or slice type. </p> </section> <h3 tabindex="-1" id="pkg-functions" class="Documentation-functionsHeader">Functions <a href="#pkg-functions" aria-label="Go to Functions">露</a></h3> <section class="Documentation-functions"><div class="Documentation-function"> <h4 tabindex="-1" id="append" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=149">append</a> <a class="Documentation-idLink" href="#append" aria-label="Go to append">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func append(slice []<a href="#Type">Type</a>, elems ...<a href="#Type">Type</a>) []<a href="#Type">Type</a></pre> </div> <p>The append built-in function appends elements to the end of a slice. If it has sufficient capacity, the destination is resliced to accommodate the new elements. If it does not, a new underlying array will be allocated. Append returns the updated slice. It is therefore necessary to store the result of append, often in the variable holding the slice itself: </p><pre>slice = append(slice, elem1, elem2) slice = append(slice, anotherSlice...) </pre><p>As a special case, it is legal to append a string to a byte slice, like this: </p><pre>slice = append([]byte(&#34;hello &#34;), &#34;world&#34;...) </pre> </div><div class="Documentation-function"> <h4 tabindex="-1" id="cap" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=189">cap</a> <a class="Documentation-idLink" href="#cap" aria-label="Go to cap">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func cap(v <a href="#Type">Type</a>) <a href="#int">int</a></pre> </div> <p>The cap built-in function returns the capacity of v, according to its type: </p><pre>Array: the number of elements in v (same as len(v)). Pointer to array: the number of elements in *v (same as len(v)). Slice: the maximum length the slice can reach when resliced; if v is nil, cap(v) is zero. Channel: the channel buffer capacity, in units of elements; if v is nil, cap(v) is zero. </pre><p>For some arguments, such as a simple array expression, the result can be a constant. See the Go language specification&#39;s &#34;Length and capacity&#34; section for details. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="clear" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=251">clear</a> <a class="Documentation-idLink" href="#clear" aria-label="Go to clear">露</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">go1.21.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func clear[T ~[]<a href="#Type">Type</a> | ~map[<a href="#Type">Type</a>]<a href="#Type1">Type1</a>](t T)</pre> </div> <p>The clear built-in function clears maps and slices. For maps, clear deletes all entries, resulting in an empty map. For slices, clear sets all elements up to the length of the slice to the zero value of the respective element type. If the argument type is a type parameter, the type parameter&#39;s type set must contain only map or slice types, and clear performs the operation implied by the type argument. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="close" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=263">close</a> <a class="Documentation-idLink" href="#close" aria-label="Go to close">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func close(c chan&lt;- <a href="#Type">Type</a>)</pre> </div> <p>The close built-in function closes a channel, which must be either bidirectional or send-only. It should be executed only by the sender, never the receiver, and has the effect of shutting down the channel after the last sent value is received. After the last value has been received from a closed channel c, any receive from c will succeed without blocking, returning the zero value for the channel element. The form </p><pre>x, ok := &lt;-c </pre><p>will also set ok to false for a closed and empty channel. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="complex" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=233">complex</a> <a class="Documentation-idLink" href="#complex" aria-label="Go to complex">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func complex(r, i <a href="#FloatType">FloatType</a>) <a href="#ComplexType">ComplexType</a></pre> </div> <p>The complex built-in function constructs a complex value from two floating-point values. The real and imaginary parts must be of the same size, either float32 or float64 (or assignable to them), and the return value will be the corresponding complex type (complex64 for float32, complex128 for float64). </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="copy" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=156">copy</a> <a class="Documentation-idLink" href="#copy" aria-label="Go to copy">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func copy(dst, src []<a href="#Type">Type</a>) <a href="#int">int</a></pre> </div> <p>The copy built-in function copies elements from a source slice into a destination slice. (As a special case, it also will copy bytes from a string to a slice of bytes.) The source and destination may overlap. Copy returns the number of elements copied, which will be the minimum of len(src) and len(dst). </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="delete" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=161">delete</a> <a class="Documentation-idLink" href="#delete" aria-label="Go to delete">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func delete(m map[<a href="#Type">Type</a>]<a href="#Type1">Type1</a>, key <a href="#Type">Type</a>)</pre> </div> <p>The delete built-in function deletes the element with the specified key (m[key]) from the map. If m is nil or there is no such element, delete is a no-op. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="imag" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=242">imag</a> <a class="Documentation-idLink" href="#imag" aria-label="Go to imag">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func imag(c <a href="#ComplexType">ComplexType</a>) <a href="#FloatType">FloatType</a></pre> </div> <p>The imag built-in function returns the imaginary part of the complex number c. The return value will be floating point type corresponding to the type of c. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="len" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=175">len</a> <a class="Documentation-idLink" href="#len" aria-label="Go to len">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func len(v <a href="#Type">Type</a>) <a href="#int">int</a></pre> </div> <p>The len built-in function returns the length of v, according to its type: </p><pre>Array: the number of elements in v. Pointer to array: the number of elements in *v (even if v is nil). Slice, or map: the number of elements in v; if v is nil, len(v) is zero. String: the number of bytes in v. Channel: the number of elements queued (unread) in the channel buffer; if v is nil, len(v) is zero. </pre><p>For some arguments, such as a string literal or a simple array expression, the result can be a constant. See the Go language specification&#39;s &#34;Length and capacity&#34; section for details. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="make" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=209">make</a> <a class="Documentation-idLink" href="#make" aria-label="Go to make">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func make(t <a href="#Type">Type</a>, size ...<a href="#IntegerType">IntegerType</a>) <a href="#Type">Type</a></pre> </div> <p>The make built-in function allocates and initializes an object of type slice, map, or chan (only). Like new, the first argument is a type, not a value. Unlike new, make&#39;s return type is the same as the type of its argument, not a pointer to it. The specification of the result depends on the type: </p><pre>Slice: The size specifies the length. The capacity of the slice is equal to its length. A second integer argument may be provided to specify a different capacity; it must be no smaller than the length. For example, make([]int, 0, 10) allocates an underlying array of size 10 and returns a slice of length 0 and capacity 10 that is backed by this underlying array. Map: An empty map is allocated with enough space to hold the specified number of elements. The size may be omitted, in which case a small starting size is allocated. Channel: The channel&#39;s buffer is initialized with the specified buffer capacity. If zero, or the size is omitted, the channel is unbuffered. </pre> </div><div class="Documentation-function"> <h4 tabindex="-1" id="max" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=215">max</a> <a class="Documentation-idLink" href="#max" aria-label="Go to max">露</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">go1.21.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func max[T <a href="/cmp">cmp</a>.<a href="/cmp#Ordered">Ordered</a>](x T, y ...T) T</pre> </div> <p>The max built-in function returns the largest value of a fixed number of arguments of <a href="/cmp#Ordered">cmp.Ordered</a> types. There must be at least one argument. If T is a floating-point type and any of the arguments are NaNs, max will return NaN. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="min" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=221">min</a> <a class="Documentation-idLink" href="#min" aria-label="Go to min">露</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">go1.21.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func min[T <a href="/cmp">cmp</a>.<a href="/cmp#Ordered">Ordered</a>](x T, y ...T) T</pre> </div> <p>The min built-in function returns the smallest value of a fixed number of arguments of <a href="/cmp#Ordered">cmp.Ordered</a> types. There must be at least one argument. If T is a floating-point type and any of the arguments are NaNs, min will return NaN. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="new" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=226">new</a> <a class="Documentation-idLink" href="#new" aria-label="Go to new">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func new(<a href="#Type">Type</a>) *<a href="#Type">Type</a></pre> </div> <p>The new built-in function allocates memory. The first argument is a type, not a value, and the value returned is a pointer to a newly allocated zero value of that type. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="panic" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=279">panic</a> <a class="Documentation-idLink" href="#panic" aria-label="Go to panic">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func panic(v <a href="#any">any</a>)</pre> </div> <p>The panic built-in function stops normal execution of the current goroutine. When a function F calls panic, normal execution of F stops immediately. Any functions whose execution was deferred by F are run in the usual way, and then F returns to its caller. To the caller G, the invocation of F then behaves like a call to panic, terminating G&#39;s execution and running any deferred functions. This continues until all functions in the executing goroutine have stopped, in reverse order. At that point, the program is terminated with a non-zero exit code. This termination sequence is called panicking and can be controlled by the built-in function recover. </p><p>Starting in Go 1.21, calling panic with a nil interface value or an untyped nil causes a run-time error (a different panic). The GODEBUG setting panicnil=1 disables the run-time error. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="print" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=297">print</a> <a class="Documentation-idLink" href="#print" aria-label="Go to print">露</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">go1.2</span> </span> </h4> <div class="Documentation-declaration"> <pre>func print(args ...<a href="#Type">Type</a>)</pre> </div> <p>The print built-in function formats its arguments in an implementation-specific way and writes the result to standard error. Print is useful for bootstrapping and debugging; it is not guaranteed to stay in the language. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="println" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=304">println</a> <a class="Documentation-idLink" href="#println" aria-label="Go to println">露</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">go1.2</span> </span> </h4> <div class="Documentation-declaration"> <pre>func println(args ...<a href="#Type">Type</a>)</pre> </div> <p>The println built-in function formats its arguments in an implementation-specific way and writes the result to standard error. Spaces are always added between arguments and a newline is appended. Println is useful for bootstrapping and debugging; it is not guaranteed to stay in the language. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="real" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=237">real</a> <a class="Documentation-idLink" href="#real" aria-label="Go to real">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func real(c <a href="#ComplexType">ComplexType</a>) <a href="#FloatType">FloatType</a></pre> </div> <p>The real built-in function returns the real part of the complex number c. The return value will be floating point type corresponding to the type of c. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="recover" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=291">recover</a> <a class="Documentation-idLink" href="#recover" aria-label="Go to recover">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func recover() <a href="#any">any</a></pre> </div> <p>The recover built-in function allows a program to manage behavior of a panicking goroutine. Executing a call to recover inside a deferred function (but not any function called by it) stops the panicking sequence by restoring normal execution and retrieves the error value passed to the call of panic. If recover is called outside the deferred function it will not stop a panicking sequence. In this case, or when the goroutine is not panicking, recover returns nil. </p><p>Prior to Go 1.21, recover would also return nil if panic is called with a nil argument. See [panic] for details. </p> </div></section> <h3 tabindex="-1" id="pkg-types" class="Documentation-typesHeader">Types <a href="#pkg-types" aria-label="Go to Types">露</a></h3> <section class="Documentation-types"><div class="Documentation-type"> <h4 tabindex="-1" id="ComplexType" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=135">ComplexType</a> <a class="Documentation-idLink" href="#ComplexType" aria-label="Go to ComplexType">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type ComplexType <a href="#complex64">complex64</a></pre> </div> <p>ComplexType is here for the purposes of documentation only. It is a stand-in for either complex type: complex64 or complex128. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="FloatType" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=131">FloatType</a> <a class="Documentation-idLink" href="#FloatType" aria-label="Go to FloatType">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type FloatType <a href="#float32">float32</a></pre> </div> <p>FloatType is here for the purposes of documentation only. It is a stand-in for either float type: float32 or float64. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="IntegerType" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=127">IntegerType</a> <a class="Documentation-idLink" href="#IntegerType" aria-label="Go to IntegerType">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type IntegerType <a href="#int">int</a></pre> </div> <p>IntegerType is here for the purposes of documentation only. It is a stand-in for any integer type: int, uint, int8 etc. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Type" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=118">Type</a> <a class="Documentation-idLink" href="#Type" aria-label="Go to Type">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Type <a href="#int">int</a></pre> </div> <p>Type is here for the purposes of documentation only. It is a stand-in for any Go type, but represents the same type for any given function invocation. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Type1" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=123">Type1</a> <a class="Documentation-idLink" href="#Type1" aria-label="Go to Type1">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Type1 <a href="#int">int</a></pre> </div> <p>Type1 is here for the purposes of documentation only. It is a stand-in for any Go type, but represents the same type for any given function invocation. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="any" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=97">any</a> <a class="Documentation-idLink" href="#any" aria-label="Go to any">露</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">go1.18</span> </span> </h4> <div class="Documentation-declaration"> <pre>type any = interface{}</pre> </div> <p>any is an alias for interface{} and is equivalent to interface{} in all ways. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="bool" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=16">bool</a> <a class="Documentation-idLink" href="#bool" aria-label="Go to bool">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type bool <a href="#bool">bool</a></pre> </div> <p>bool is the set of boolean values, true and false. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="byte" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=90">byte</a> <a class="Documentation-idLink" href="#byte" aria-label="Go to byte">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type byte = <a href="#uint8">uint8</a></pre> </div> <p>byte is an alias for uint8 and is equivalent to uint8 in all ways. It is used, by convention, to distinguish byte values from 8-bit unsigned integer values. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="comparable" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=104">comparable</a> <a class="Documentation-idLink" href="#comparable" aria-label="Go to comparable">露</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">go1.18</span> </span> </h4> <div class="Documentation-declaration"> <pre>type comparable interface{ <a href="#comparable">comparable</a> }</pre> </div> <p>comparable is an interface that is implemented by all comparable types (booleans, numbers, strings, pointers, channels, arrays of comparable types, structs whose fields are all comparable types). The comparable interface may only be used as a type parameter constraint, not as the type of a variable. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="complex128" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=68">complex128</a> <a class="Documentation-idLink" href="#complex128" aria-label="Go to complex128">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type complex128 <a href="#complex128">complex128</a></pre> </div> <p>complex128 is the set of all complex numbers with float64 real and imaginary parts. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="complex64" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=64">complex64</a> <a class="Documentation-idLink" href="#complex64" aria-label="Go to complex64">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type complex64 <a href="#complex64">complex64</a></pre> </div> <p>complex64 is the set of all complex numbers with float32 real and imaginary parts. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="error" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=308">error</a> <a class="Documentation-idLink" href="#error" aria-label="Go to error">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type error interface { <span id="error.Error" data-kind="method"> Error() <a href="#string">string</a> </span>}</pre> </div> <p>The error built-in interface type is the conventional interface for representing an error condition, with the nil value representing no error. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="float32" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=57">float32</a> <a class="Documentation-idLink" href="#float32" aria-label="Go to float32">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type float32 <a href="#float32">float32</a></pre> </div> <p>float32 is the set of all IEEE 754 32-bit floating-point numbers. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="float64" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=60">float64</a> <a class="Documentation-idLink" href="#float64" aria-label="Go to float64">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type float64 <a href="#float64">float64</a></pre> </div> <p>float64 is the set of all IEEE 754 64-bit floating-point numbers. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="int" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=77">int</a> <a class="Documentation-idLink" href="#int" aria-label="Go to int">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type int <a href="#int">int</a></pre> </div> <p>int is a signed integer type that is at least 32 bits in size. It is a distinct type, however, and not an alias for, say, int32. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="int16" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=46">int16</a> <a class="Documentation-idLink" href="#int16" aria-label="Go to int16">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type int16 <a href="#int16">int16</a></pre> </div> <p>int16 is the set of all signed 16-bit integers. Range: -32768 through 32767. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="int32" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=50">int32</a> <a class="Documentation-idLink" href="#int32" aria-label="Go to int32">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type int32 <a href="#int32">int32</a></pre> </div> <p>int32 is the set of all signed 32-bit integers. Range: -2147483648 through 2147483647. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="int64" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=54">int64</a> <a class="Documentation-idLink" href="#int64" aria-label="Go to int64">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type int64 <a href="#int64">int64</a></pre> </div> <p>int64 is the set of all signed 64-bit integers. Range: -9223372036854775808 through 9223372036854775807. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="int8" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=42">int8</a> <a class="Documentation-idLink" href="#int8" aria-label="Go to int8">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type int8 <a href="#int8">int8</a></pre> </div> <p>int8 is the set of all signed 8-bit integers. Range: -128 through 127. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="rune" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=94">rune</a> <a class="Documentation-idLink" href="#rune" aria-label="Go to rune">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type rune = <a href="#int32">int32</a></pre> </div> <p>rune is an alias for int32 and is equivalent to int32 in all ways. It is used, by convention, to distinguish character values from integer values. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="string" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=73">string</a> <a class="Documentation-idLink" href="#string" aria-label="Go to string">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type string <a href="#string">string</a></pre> </div> <p>string is the set of all strings of 8-bit bytes, conventionally but not necessarily representing UTF-8-encoded text. A string may be empty, but not nil. Values of string type are immutable. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="uint" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=81">uint</a> <a class="Documentation-idLink" href="#uint" aria-label="Go to uint">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type uint <a href="#uint">uint</a></pre> </div> <p>uint is an unsigned integer type that is at least 32 bits in size. It is a distinct type, however, and not an alias for, say, uint32. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="uint16" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=30">uint16</a> <a class="Documentation-idLink" href="#uint16" aria-label="Go to uint16">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type uint16 <a href="#uint16">uint16</a></pre> </div> <p>uint16 is the set of all unsigned 16-bit integers. Range: 0 through 65535. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="uint32" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=34">uint32</a> <a class="Documentation-idLink" href="#uint32" aria-label="Go to uint32">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type uint32 <a href="#uint32">uint32</a></pre> </div> <p>uint32 is the set of all unsigned 32-bit integers. Range: 0 through 4294967295. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="uint64" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=38">uint64</a> <a class="Documentation-idLink" href="#uint64" aria-label="Go to uint64">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type uint64 <a href="#uint64">uint64</a></pre> </div> <p>uint64 is the set of all unsigned 64-bit integers. Range: 0 through 18446744073709551615. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="uint8" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=26">uint8</a> <a class="Documentation-idLink" href="#uint8" aria-label="Go to uint8">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type uint8 <a href="#uint8">uint8</a></pre> </div> <p>uint8 is the set of all unsigned 8-bit integers. Range: 0 through 255. </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="uintptr" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go;l=85">uintptr</a> <a class="Documentation-idLink" href="#uintptr" aria-label="Go to uintptr">露</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type uintptr <a href="#uintptr">uintptr</a></pre> </div> <p>uintptr is an integer type that is large enough to hold the bit pattern of any pointer. </p> </div></section></div> </div> </div> <div class="UnitFiles js-unitFiles"> <h2 class="UnitFiles-title" id="section-sourcefiles"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/insert_drive_file_gm_grey_24dp.svg" alt=""> Source Files <a class="UnitFiles-idLink" href="#section-sourcefiles" aria-label="Go to Source Files">露</a> </h2> <div class="UnitFiles-titleLink"> <a href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin" target="_blank" rel="noopener">View all Source files</a> </div> <div> <ul class="UnitFiles-fileList"><li> <a href="https://cs.opensource.google/go/go/+/go1.23.3:src/builtin/builtin.go" target="_blank" rel="noopener" title="builtin.go">builtin.go</a> </li></ul> </div> </div> </div> </div> <div id="showInternal-description" hidden> Click to show internal directories. </div> <div id="hideInternal-description" hidden> Click to hide internal directories. </div> </article> <footer class="go-Main-footer"></footer> </main> <footer class="go-Footer"> <div class="go-Footer-links"> <div class="go-Footer-linkColumn"> <a href="https://go.dev/solutions" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Why Go </a> <a href="https://go.dev/solutions#use-cases" class="go-Footer-link" data-gtmc="footer link"> Use Cases </a> <a href="https://go.dev/solutions#case-studies" class="go-Footer-link" data-gtmc="footer link"> Case Studies </a> </div> <div class="go-Footer-linkColumn"> <a href="https://learn.go.dev/" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Get Started </a> <a href="https://play.golang.org" class="go-Footer-link" data-gtmc="footer link"> Playground </a> <a href="https://tour.golang.org" class="go-Footer-link" data-gtmc="footer link"> Tour </a> <a href="https://stackoverflow.com/questions/tagged/go?tab=Newest" class="go-Footer-link" data-gtmc="footer link"> Stack Overflow </a> <a href="https://go.dev/help" class="go-Footer-link" data-gtmc="footer link"> Help </a> </div> <div class="go-Footer-linkColumn"> <a href="https://pkg.go.dev" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Packages </a> <a href="/std" class="go-Footer-link" data-gtmc="footer link"> Standard Library </a> <a href="/golang.org/x" class="go-Footer-link" data-gtmc="footer link"> Sub-repositories </a> <a href="https://pkg.go.dev/about" class="go-Footer-link" data-gtmc="footer link"> About Go Packages </a> </div> <div class="go-Footer-linkColumn"> <a href="https://go.dev/project" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> About </a> <a href="https://go.dev/dl/" class="go-Footer-link" data-gtmc="footer link">Download</a> <a href="https://go.dev/blog" class="go-Footer-link" data-gtmc="footer link">Blog</a> <a href="https://github.com/golang/go/issues" class="go-Footer-link" data-gtmc="footer link"> Issue Tracker </a> <a href="https://go.dev/doc/devel/release.html" class="go-Footer-link" data-gtmc="footer link"> Release Notes </a> <a href="https://blog.golang.org/go-brand" class="go-Footer-link" data-gtmc="footer link"> Brand Guidelines </a> <a href="https://go.dev/conduct" class="go-Footer-link" data-gtmc="footer link"> Code of Conduct </a> </div> <div class="go-Footer-linkColumn"> <a href="https://www.twitter.com/golang" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Connect </a> <a href="https://www.twitter.com/golang" class="go-Footer-link" data-gtmc="footer link"> Twitter </a> <a href="https://github.com/golang" class="go-Footer-link" data-gtmc="footer link">GitHub</a> <a href="https://invite.slack.golangbridge.org/" class="go-Footer-link" data-gtmc="footer link"> Slack </a> <a href="https://reddit.com/r/golang" class="go-Footer-link" data-gtmc="footer link"> r/golang </a> <a href="https://www.meetup.com/pro/go" class="go-Footer-link" data-gtmc="footer link"> Meetup </a> <a href="https://golangweekly.com/" class="go-Footer-link" data-gtmc="footer link"> Golang Weekly </a> </div> </div> <div class="go-Footer-bottom"> <img class="go-Footer-gopher" width="1431" height="901" src="/static/shared/gopher/pilot-bust-1431x901.svg" alt="Gopher in flight goggles"> <ul class="go-Footer-listRow"> <li class="go-Footer-listItem"> <a href="https://go.dev/copyright" data-gtmc="footer link">Copyright</a> </li> <li class="go-Footer-listItem"> <a href="https://go.dev/tos" data-gtmc="footer link">Terms of Service</a> </li> <li class="go-Footer-listItem"> <a href="http://www.google.com/intl/en/policies/privacy/" data-gtmc="footer link" target="_blank" rel="noopener"> Privacy Policy </a> </li> <li class="go-Footer-listItem"> <a href="https://go.dev/s/pkgsite-feedback" target="_blank" rel="noopener" data-gtmc="footer link"> Report an Issue </a> </li> <li class="go-Footer-listItem"> <button class="go-Button go-Button--text go-Footer-toggleTheme js-toggleTheme" aria-label="Theme Toggle"> <img data-value="auto" class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/brightness_6_gm_grey_24dp.svg" alt="System theme"> <img data-value="dark" class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/brightness_2_gm_grey_24dp.svg" alt="Dark theme"> <img data-value="light" class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/light_mode_gm_grey_24dp.svg" alt="Light theme"> <p> Theme Toggle </p> </button> </li> <li class="go-Footer-listItem"> <button class="go-Button go-Button--text go-Footer-keyboard js-openShortcuts" aria-label="Shorcuts Modal"> <img class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/keyboard_grey_24dp.svg" alt=""> <p> Shortcuts Modal </p> </button> </li> </ul> <a class="go-Footer-googleLogo" href="https://google.com" target="_blank"rel="noopener" data-gtmc="footer link"> <img class="go-Footer-googleLogoImg" height="24" width="72" src="/static/shared/logo/google-white.svg" alt="Google logo"> </a> </div> </footer> <dialog id="jump-to-modal" class="JumpDialog go-Modal go-Modal--md js-modal"> <form method="dialog" data-gmtc="jump to form" aria-label="Jump to Identifier"> <div class="Dialog-title go-Modal-header"> <h2>Jump to</h2> <button class="go-Button go-Button--inline" type="button" data-modal-close data-gtmc="modal button" aria-label="Close" > <img class="go-Icon" height="24" width="24" src="/static/shared/icon/close_gm_grey_24dp.svg" alt="" /> </button> </div> <div class="JumpDialog-filter"> <input class="JumpDialog-input go-Input" autocomplete="off" type="text"> </div> <div class="JumpDialog-body go-Modal-body"> <div class="JumpDialog-list"></div> </div> <div class="go-Modal-actions"> <button class="go-Button" data-test-id="close-dialog">Close</button> </div> </form> </dialog> <dialog class="ShortcutsDialog go-Modal go-Modal--sm js-modal"> <form method="dialog"> <div class="go-Modal-header"> <h2>Keyboard shortcuts</h2> <button class="go-Button go-Button--inline" type="button" data-modal-close data-gtmc="modal button" aria-label="Close" > <img class="go-Icon" height="24" width="24" src="/static/shared/icon/close_gm_grey_24dp.svg" alt="" /> </button> </div> <div class="go-Modal-body"> <table> <tbody> <tr><td class="ShortcutsDialog-key"> <strong>?</strong></td><td> : This menu</td> </tr> <tr><td class="ShortcutsDialog-key"> <strong>/</strong></td><td> : Search site</td> </tr> <tr><td class="ShortcutsDialog-key"> <strong>f</strong> or <strong>F</strong></td><td> : Jump to</td> </tr> <tr> <td class="ShortcutsDialog-key"><strong>y</strong> or <strong>Y</strong></td> <td> : Canonical URL</td> </tr> </tbody> </table> </div> <div class="go-Modal-actions"> <button class="go-Button" data-test-id="close-dialog">Close</button> </div> </form> </dialog> <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> <script> // this will throw if the querySelector can鈥檛 find the element const gtmId = document.querySelector('.js-gtmID').dataset.gtmid; if (!gtmId) { throw new Error('Google Tag Manager ID not found'); } loadScript(`https://www.googletagmanager.com/gtm.js?id=${gtmId}`); </script> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W8MVQXG" height="0" width="0" style="display:none;visibility:hidden"> </iframe> </noscript> <div class="js-canonicalURLPath" data-canonical-url-path="/builtin@go1.23.3" hidden></div> <div class="js-playgroundVars" data-modulepath="std" data-version="v1.23.3" hidden></div> <script> loadScript('/static/frontend/unit/main/main.js') </script> <script> loadScript('/static/frontend/unit/unit.js') </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10