You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1239 lines
27 KiB

8 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="theme-color" content="#375EAB">
  7. <title>builtin - The Go Programming Language</title>
  8. <link type="text/css" rel="stylesheet" href="../../lib/godoc/style.css">
  9. <link rel="stylesheet" href="../../lib/godoc/jquery.treeview.css">
  10. <script type="text/javascript">window.initFuncs = [];</script>
  11. </head>
  12. <body>
  13. <div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
  14. ...
  15. </div><!-- #lowframe -->
  16. <div id="topbar" class="wide"><div class="container">
  17. <div class="top-heading" id="heading-wide"><a href="http://localhost:6060/">The Go Programming Language</a></div>
  18. <div class="top-heading" id="heading-narrow"><a href="http://localhost:6060/">Go</a></div>
  19. <a href="index.html#" id="menu-button"><span id="menu-button-arrow">&#9661;</span></a>
  20. <form method="GET" action="http://localhost:6060/search">
  21. <div id="menu">
  22. <a href="http://localhost:6060/doc/">Documents</a>
  23. <a href="http://localhost:6060/pkg/">Packages</a>
  24. <a href="http://localhost:6060/project/">The Project</a>
  25. <a href="http://localhost:6060/help/">Help</a>
  26. <a href="http://localhost:6060/blog/">Blog</a>
  27. <input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
  28. </div>
  29. </form>
  30. </div></div>
  31. <div id="page" class="wide">
  32. <div class="container">
  33. <h1>Package builtin</h1>
  34. <div id="nav"></div>
  35. <!--
  36. Copyright 2009 The Go Authors. All rights reserved.
  37. Use of this source code is governed by a BSD-style
  38. license that can be found in the LICENSE file.
  39. -->
  40. <!--
  41. Note: Static (i.e., not template-generated) href and id
  42. attributes start with "pkg-" to make it impossible for
  43. them to conflict with generated attributes (some of which
  44. correspond to Go identifiers).
  45. -->
  46. <script type='text/javascript'>
  47. document.ANALYSIS_DATA = null;
  48. document.CALLGRAPH = null;
  49. </script>
  50. <div id="short-nav">
  51. <dl>
  52. <dd><code>import "builtin"</code></dd>
  53. </dl>
  54. <dl>
  55. <dd><a href="index.html#pkg-overview" class="overviewLink">Overview</a></dd>
  56. <dd><a href="index.html#pkg-index" class="indexLink">Index</a></dd>
  57. </dl>
  58. </div>
  59. <!-- The package's Name is printed as title by the top-level template -->
  60. <div id="pkg-overview" class="toggleVisible">
  61. <div class="collapsed">
  62. <h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
  63. </div>
  64. <div class="expanded">
  65. <h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
  66. <p>
  67. Package builtin provides documentation for Go&#39;s predeclared identifiers.
  68. The items documented here are not actually in package builtin
  69. but their descriptions here allow godoc to present documentation
  70. for the language&#39;s special identifiers.
  71. </p>
  72. </div>
  73. </div>
  74. <div id="pkg-index" class="toggleVisible">
  75. <div class="collapsed">
  76. <h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
  77. </div>
  78. <div class="expanded">
  79. <h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
  80. <!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
  81. <div id="manual-nav">
  82. <dl>
  83. <dd><a href="index.html#pkg-constants">Constants</a></dd>
  84. <dd><a href="index.html#pkg-variables">Variables</a></dd>
  85. <dd><a href="index.html#append">func append(slice []Type, elems ...Type) []Type</a></dd>
  86. <dd><a href="index.html#cap">func cap(v Type) int</a></dd>
  87. <dd><a href="index.html#close">func close(c chan&lt;- Type)</a></dd>
  88. <dd><a href="index.html#complex">func complex(r, i FloatType) ComplexType</a></dd>
  89. <dd><a href="index.html#copy">func copy(dst, src []Type) int</a></dd>
  90. <dd><a href="index.html#delete">func delete(m map[Type]Type1, key Type)</a></dd>
  91. <dd><a href="index.html#imag">func imag(c ComplexType) FloatType</a></dd>
  92. <dd><a href="index.html#len">func len(v Type) int</a></dd>
  93. <dd><a href="index.html#make">func make(Type, size IntegerType) Type</a></dd>
  94. <dd><a href="index.html#new">func new(Type) *Type</a></dd>
  95. <dd><a href="index.html#panic">func panic(v interface{})</a></dd>
  96. <dd><a href="index.html#print">func print(args ...Type)</a></dd>
  97. <dd><a href="index.html#println">func println(args ...Type)</a></dd>
  98. <dd><a href="index.html#real">func real(c ComplexType) FloatType</a></dd>
  99. <dd><a href="index.html#recover">func recover() interface{}</a></dd>
  100. <dd><a href="index.html#ComplexType">type ComplexType</a></dd>
  101. <dd><a href="index.html#FloatType">type FloatType</a></dd>
  102. <dd><a href="index.html#IntegerType">type IntegerType</a></dd>
  103. <dd><a href="index.html#Type">type Type</a></dd>
  104. <dd><a href="index.html#Type1">type Type1</a></dd>
  105. <dd><a href="index.html#bool">type bool</a></dd>
  106. <dd><a href="index.html#byte">type byte</a></dd>
  107. <dd><a href="index.html#complex128">type complex128</a></dd>
  108. <dd><a href="index.html#complex64">type complex64</a></dd>
  109. <dd><a href="index.html#error">type error</a></dd>
  110. <dd><a href="index.html#float32">type float32</a></dd>
  111. <dd><a href="index.html#float64">type float64</a></dd>
  112. <dd><a href="index.html#int">type int</a></dd>
  113. <dd><a href="index.html#int16">type int16</a></dd>
  114. <dd><a href="index.html#int32">type int32</a></dd>
  115. <dd><a href="index.html#int64">type int64</a></dd>
  116. <dd><a href="index.html#int8">type int8</a></dd>
  117. <dd><a href="index.html#rune">type rune</a></dd>
  118. <dd><a href="index.html#string">type string</a></dd>
  119. <dd><a href="index.html#uint">type uint</a></dd>
  120. <dd><a href="index.html#uint16">type uint16</a></dd>
  121. <dd><a href="index.html#uint32">type uint32</a></dd>
  122. <dd><a href="index.html#uint64">type uint64</a></dd>
  123. <dd><a href="index.html#uint8">type uint8</a></dd>
  124. <dd><a href="index.html#uintptr">type uintptr</a></dd>
  125. </dl>
  126. </div><!-- #manual-nav -->
  127. <h4>Package files</h4>
  128. <p>
  129. <span style="font-size:90%">
  130. <a href="http://localhost:6060/src/builtin/builtin.go">builtin.go</a>
  131. </span>
  132. </p>
  133. </div><!-- .expanded -->
  134. </div><!-- #pkg-index -->
  135. <div id="pkg-callgraph" class="toggle" style="display: none">
  136. <div class="collapsed">
  137. <h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
  138. </div> <!-- .expanded -->
  139. <div class="expanded">
  140. <h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
  141. <p>
  142. In the call graph viewer below, each node
  143. is a function belonging to this package
  144. and its children are the functions it
  145. calls&mdash;perhaps dynamically.
  146. </p>
  147. <p>
  148. The root nodes are the entry points of the
  149. package: functions that may be called from
  150. outside the package.
  151. There may be non-exported or anonymous
  152. functions among them if they are called
  153. dynamically from another package.
  154. </p>
  155. <p>
  156. Click a node to visit that function's source code.
  157. From there you can visit its callers by
  158. clicking its declaring <code>func</code>
  159. token.
  160. </p>
  161. <p>
  162. Functions may be omitted if they were
  163. determined to be unreachable in the
  164. particular programs or tests that were
  165. analyzed.
  166. </p>
  167. <!-- Zero means show all package entry points. -->
  168. <ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
  169. </div>
  170. </div> <!-- #pkg-callgraph -->
  171. <h2 id="pkg-constants">Constants</h2>
  172. <pre>const (
  173. <span id="true">true</span> = 0 == 0 <span class="comment">// Untyped bool.</span>
  174. <span id="false">false</span> = 0 != 0 <span class="comment">// Untyped bool.</span>
  175. )</pre>
  176. <p>
  177. true and false are the two untyped boolean values.
  178. </p>
  179. <pre>const <span id="iota">iota</span> = 0 <span class="comment">// Untyped int.</span>
  180. </pre>
  181. <p>
  182. iota is a predeclared identifier representing the untyped integer ordinal
  183. number of the current const specification in a (usually parenthesized)
  184. const declaration. It is zero-indexed.
  185. </p>
  186. <h2 id="pkg-variables">Variables</h2>
  187. <pre>var <span id="nil">nil</span> <a href="index.html#Type">Type</a> <span class="comment">// Type must be a pointer, channel, func, interface, map, or slice type</span>
  188. </pre>
  189. <p>
  190. nil is a predeclared identifier representing the zero value for a
  191. pointer, channel, func, interface, map, or slice type.
  192. </p>
  193. <h2 id="append">func <a href="http://localhost:6060/src/builtin/builtin.go?s=4716:4763#L124">append</a></h2>
  194. <pre>func append(slice []<a href="index.html#Type">Type</a>, elems ...<a href="index.html#Type">Type</a>) []<a href="index.html#Type">Type</a></pre>
  195. <p>
  196. The append built-in function appends elements to the end of a slice. If
  197. it has sufficient capacity, the destination is resliced to accommodate the
  198. new elements. If it does not, a new underlying array will be allocated.
  199. Append returns the updated slice. It is therefore necessary to store the
  200. result of append, often in the variable holding the slice itself:
  201. </p>
  202. <pre>slice = append(slice, elem1, elem2)
  203. slice = append(slice, anotherSlice...)
  204. </pre>
  205. <p>
  206. As a special case, it is legal to append a string to a byte slice, like this:
  207. </p>
  208. <pre>slice = append([]byte(&#34;hello &#34;), &#34;world&#34;...)
  209. </pre>
  210. <h2 id="cap">func <a href="http://localhost:6060/src/builtin/builtin.go?s=6143:6163#L154">cap</a></h2>
  211. <pre>func cap(v <a href="index.html#Type">Type</a>) int</pre>
  212. <p>
  213. The cap built-in function returns the capacity of v, according to its type:
  214. </p>
  215. <pre>Array: the number of elements in v (same as len(v)).
  216. Pointer to array: the number of elements in *v (same as len(v)).
  217. Slice: the maximum length the slice can reach when resliced;
  218. if v is nil, cap(v) is zero.
  219. Channel: the channel buffer capacity, in units of elements;
  220. if v is nil, cap(v) is zero.
  221. </pre>
  222. <h2 id="close">func <a href="http://localhost:6060/src/builtin/builtin.go?s=8588:8613#L203">close</a></h2>
  223. <pre>func close(c chan&lt;- <a href="index.html#Type">Type</a>)</pre>
  224. <p>
  225. The close built-in function closes a channel, which must be either
  226. bidirectional or send-only. It should be executed only by the sender,
  227. never the receiver, and has the effect of shutting down the channel after
  228. the last sent value is received. After the last value has been received
  229. from a closed channel c, any receive from c will succeed without
  230. blocking, returning the zero value for the channel element. The form
  231. </p>
  232. <pre>x, ok := &lt;-c
  233. </pre>
  234. <p>
  235. will also set ok to false for a closed channel.
  236. </p>
  237. <h2 id="complex">func <a href="http://localhost:6060/src/builtin/builtin.go?s=7650:7690#L184">complex</a></h2>
  238. <pre>func complex(r, i <a href="index.html#FloatType">FloatType</a>) <a href="index.html#ComplexType">ComplexType</a></pre>
  239. <p>
  240. The complex built-in function constructs a complex value from two
  241. floating-point values. The real and imaginary parts must be of the same
  242. size, either float32 or float64 (or assignable to them), and the return
  243. value will be the corresponding complex type (complex64 for float32,
  244. complex128 for float64).
  245. </p>
  246. <h2 id="copy">func <a href="http://localhost:6060/src/builtin/builtin.go?s=5085:5115#L131">copy</a></h2>
  247. <pre>func copy(dst, src []<a href="index.html#Type">Type</a>) int</pre>
  248. <p>
  249. The copy built-in function copies elements from a source slice into a
  250. destination slice. (As a special case, it also will copy bytes from a
  251. string to a slice of bytes.) The source and destination may overlap. Copy
  252. returns the number of elements copied, which will be the minimum of
  253. len(src) and len(dst).
  254. </p>
  255. <h2 id="delete">func <a href="http://localhost:6060/src/builtin/builtin.go?s=5281:5320#L136">delete</a></h2>
  256. <pre>func delete(m map[<a href="index.html#Type">Type</a>]<a href="index.html#Type1">Type1</a>, key <a href="index.html#Type">Type</a>)</pre>
  257. <p>
  258. The delete built-in function deletes the element with the specified key
  259. (m[key]) from the map. If m is nil or there is no such element, delete
  260. is a no-op.
  261. </p>
  262. <h2 id="imag">func <a href="http://localhost:6060/src/builtin/builtin.go?s=8050:8084#L193">imag</a></h2>
  263. <pre>func imag(c <a href="index.html#ComplexType">ComplexType</a>) <a href="index.html#FloatType">FloatType</a></pre>
  264. <p>
  265. The imag built-in function returns the imaginary part of the complex
  266. number c. The return value will be floating point type corresponding to
  267. the type of c.
  268. </p>
  269. <h2 id="len">func <a href="http://localhost:6060/src/builtin/builtin.go?s=5727:5747#L145">len</a></h2>
  270. <pre>func len(v <a href="index.html#Type">Type</a>) int</pre>
  271. <p>
  272. The len built-in function returns the length of v, according to its type:
  273. </p>
  274. <pre>Array: the number of elements in v.
  275. Pointer to array: the number of elements in *v (even if v is nil).
  276. Slice, or map: the number of elements in v; if v is nil, len(v) is zero.
  277. String: the number of bytes in v.
  278. Channel: the number of elements queued (unread) in the channel buffer;
  279. if v is nil, len(v) is zero.
  280. </pre>
  281. <h2 id="make">func <a href="http://localhost:6060/src/builtin/builtin.go?s=7091:7129#L172">make</a></h2>
  282. <pre>func make(Type, size <a href="index.html#IntegerType">IntegerType</a>) <a href="index.html#Type">Type</a></pre>
  283. <p>
  284. The make built-in function allocates and initializes an object of type
  285. slice, map, or chan (only). Like new, the first argument is a type, not a
  286. value. Unlike new, make&#39;s return type is the same as the type of its
  287. argument, not a pointer to it. The specification of the result depends on
  288. the type:
  289. </p>
  290. <pre>Slice: The size specifies the length. The capacity of the slice is
  291. equal to its length. A second integer argument may be provided to
  292. specify a different capacity; it must be no smaller than the
  293. length, so make([]int, 0, 10) allocates a slice of length 0 and
  294. capacity 10.
  295. Map: An initial allocation is made according to the size but the
  296. resulting map has length 0. The size may be omitted, in which case
  297. a small starting size is allocated.
  298. Channel: The channel&#39;s buffer is initialized with the specified
  299. buffer capacity. If zero, or the size is omitted, the channel is
  300. unbuffered.
  301. </pre>
  302. <h2 id="new">func <a href="http://localhost:6060/src/builtin/builtin.go?s=7309:7329#L177">new</a></h2>
  303. <pre>func new(<a href="index.html#Type">Type</a>) *<a href="index.html#Type">Type</a></pre>
  304. <p>
  305. The new built-in function allocates memory. The first argument is a type,
  306. not a value, and the value returned is a pointer to a newly
  307. allocated zero value of that type.
  308. </p>
  309. <h2 id="panic">func <a href="http://localhost:6060/src/builtin/builtin.go?s=9359:9384#L216">panic</a></h2>
  310. <pre>func panic(v interface{})</pre>
  311. <p>
  312. The panic built-in function stops normal execution of the current
  313. goroutine. When a function F calls panic, normal execution of F stops
  314. immediately. Any functions whose execution was deferred by F are run in
  315. the usual way, and then F returns to its caller. To the caller G, the
  316. invocation of F then behaves like a call to panic, terminating G&#39;s
  317. execution and running any deferred functions. This continues until all
  318. functions in the executing goroutine have stopped, in reverse order. At
  319. that point, the program is terminated and the error condition is reported,
  320. including the value of the argument to panic. This termination sequence
  321. is called panicking and can be controlled by the built-in function
  322. recover.
  323. </p>
  324. <h2 id="print">func <a href="http://localhost:6060/src/builtin/builtin.go?s=10264:10288#L233">print</a></h2>
  325. <pre>func print(args ...<a href="index.html#Type">Type</a>)</pre>
  326. <p>
  327. The print built-in function formats its arguments in an
  328. implementation-specific way and writes the result to standard error.
  329. Print is useful for bootstrapping and debugging; it is not guaranteed
  330. to stay in the language.
  331. </p>
  332. <h2 id="println">func <a href="http://localhost:6060/src/builtin/builtin.go?s=10598:10624#L240">println</a></h2>
  333. <pre>func println(args ...<a href="index.html#Type">Type</a>)</pre>
  334. <p>
  335. The println built-in function formats its arguments in an
  336. implementation-specific way and writes the result to standard error.
  337. Spaces are always added between arguments and a newline is appended.
  338. Println is useful for bootstrapping and debugging; it is not guaranteed
  339. to stay in the language.
  340. </p>
  341. <h2 id="real">func <a href="http://localhost:6060/src/builtin/builtin.go?s=7849:7883#L188">real</a></h2>
  342. <pre>func real(c <a href="index.html#ComplexType">ComplexType</a>) <a href="index.html#FloatType">FloatType</a></pre>
  343. <p>
  344. The real built-in function returns the real part of the complex number c.
  345. The return value will be floating point type corresponding to the type of c.
  346. </p>
  347. <h2 id="recover">func <a href="http://localhost:6060/src/builtin/builtin.go?s=10004:10030#L227">recover</a></h2>
  348. <pre>func recover() interface{}</pre>
  349. <p>
  350. The recover built-in function allows a program to manage behavior of a
  351. panicking goroutine. Executing a call to recover inside a deferred
  352. function (but not any function called by it) stops the panicking sequence
  353. by restoring normal execution and retrieves the error value passed to the
  354. call of panic. If recover is called outside the deferred function it will
  355. not stop a panicking sequence. In this case, or when the goroutine is not
  356. panicking, or if the argument supplied to panic was nil, recover returns
  357. nil. Thus the return value from recover reports whether the goroutine is
  358. panicking.
  359. </p>
  360. <h2 id="ComplexType">type <a href="http://localhost:6060/src/builtin/builtin.go?s=4105:4131#L113">ComplexType</a></h2>
  361. <pre>type ComplexType complex64</pre>
  362. <p>
  363. ComplexType is here for the purposes of documentation only. It is a
  364. stand-in for either complex type: complex64 or complex128.
  365. </p>
  366. <h2 id="FloatType">type <a href="http://localhost:6060/src/builtin/builtin.go?s=3948:3970#L109">FloatType</a></h2>
  367. <pre>type FloatType float32</pre>
  368. <p>
  369. FloatType is here for the purposes of documentation only. It is a stand-in
  370. for either float type: float32 or float64.
  371. </p>
  372. <h2 id="IntegerType">type <a href="http://localhost:6060/src/builtin/builtin.go?s=3802:3822#L105">IntegerType</a></h2>
  373. <pre>type IntegerType int</pre>
  374. <p>
  375. IntegerType is here for the purposes of documentation only. It is a stand-in
  376. for any integer type: int, uint, int8 etc.
  377. </p>
  378. <h2 id="Type">type <a href="http://localhost:6060/src/builtin/builtin.go?s=3484:3497#L96">Type</a></h2>
  379. <pre>type Type int</pre>
  380. <p>
  381. Type is here for the purposes of documentation only. It is a stand-in
  382. for any Go type, but represents the same type for any given function
  383. invocation.
  384. </p>
  385. <h2 id="Type1">type <a href="http://localhost:6060/src/builtin/builtin.go?s=3660:3674#L101">Type1</a></h2>
  386. <pre>type Type1 int</pre>
  387. <p>
  388. Type1 is here for the purposes of documentation only. It is a stand-in
  389. for any Go type, but represents the same type for any given function
  390. invocation.
  391. </p>
  392. <h2 id="bool">type <a href="http://localhost:6060/src/builtin/builtin.go?s=481:495#L4">bool</a></h2>
  393. <pre>type bool bool</pre>
  394. <p>
  395. bool is the set of boolean values, true and false.
  396. </p>
  397. <h2 id="byte">type <a href="http://localhost:6060/src/builtin/builtin.go?s=2701:2715#L78">byte</a></h2>
  398. <pre>type byte byte</pre>
  399. <p>
  400. byte is an alias for uint8 and is equivalent to uint8 in all ways. It is
  401. used, by convention, to distinguish byte values from 8-bit unsigned
  402. integer values.
  403. </p>
  404. <h2 id="complex128">type <a href="http://localhost:6060/src/builtin/builtin.go?s=1867:1893#L56">complex128</a></h2>
  405. <pre>type complex128 complex128</pre>
  406. <p>
  407. complex128 is the set of all complex numbers with float64 real and
  408. imaginary parts.
  409. </p>
  410. <h2 id="complex64">type <a href="http://localhost:6060/src/builtin/builtin.go?s=1751:1775#L52">complex64</a></h2>
  411. <pre>type complex64 complex64</pre>
  412. <p>
  413. complex64 is the set of all complex numbers with float32 real and
  414. imaginary parts.
  415. </p>
  416. <h2 id="error">type <a href="http://localhost:6060/src/builtin/builtin.go?s=10775:10815#L244">error</a></h2>
  417. <pre>type error interface {
  418. Error() string
  419. }</pre>
  420. <p>
  421. The error built-in interface type is the conventional interface for
  422. representing an error condition, with the nil value representing no error.
  423. </p>
  424. <h2 id="float32">type <a href="http://localhost:6060/src/builtin/builtin.go?s=1549:1569#L45">float32</a></h2>
  425. <pre>type float32 float32</pre>
  426. <p>
  427. float32 is the set of all IEEE-754 32-bit floating-point numbers.
  428. </p>
  429. <h2 id="float64">type <a href="http://localhost:6060/src/builtin/builtin.go?s=1640:1660#L48">float64</a></h2>
  430. <pre>type float64 float64</pre>
  431. <p>
  432. float64 is the set of all IEEE-754 64-bit floating-point numbers.
  433. </p>
  434. <h2 id="int">type <a href="http://localhost:6060/src/builtin/builtin.go?s=2249:2261#L65">int</a></h2>
  435. <pre>type int int</pre>
  436. <p>
  437. int is a signed integer type that is at least 32 bits in size. It is a
  438. distinct type, however, and not an alias for, say, int32.
  439. </p>
  440. <h2 id="int16">type <a href="http://localhost:6060/src/builtin/builtin.go?s=1222:1238#L34">int16</a></h2>
  441. <pre>type int16 int16</pre>
  442. <p>
  443. int16 is the set of all signed 16-bit integers.
  444. Range: -32768 through 32767.
  445. </p>
  446. <h2 id="int32">type <a href="http://localhost:6060/src/builtin/builtin.go?s=1333:1349#L38">int32</a></h2>
  447. <pre>type int32 int32</pre>
  448. <p>
  449. int32 is the set of all signed 32-bit integers.
  450. Range: -2147483648 through 2147483647.
  451. </p>
  452. <h2 id="int64">type <a href="http://localhost:6060/src/builtin/builtin.go?s=1462:1478#L42">int64</a></h2>
  453. <pre>type int64 int64</pre>
  454. <p>
  455. int64 is the set of all signed 64-bit integers.
  456. Range: -9223372036854775808 through 9223372036854775807.
  457. </p>
  458. <h2 id="int8">type <a href="http://localhost:6060/src/builtin/builtin.go?s=1123:1137#L30">int8</a></h2>
  459. <pre>type int8 int8</pre>
  460. <p>
  461. int8 is the set of all signed 8-bit integers.
  462. Range: -128 through 127.
  463. </p>
  464. <h2 id="rune">type <a href="http://localhost:6060/src/builtin/builtin.go?s=2870:2884#L82">rune</a></h2>
  465. <pre>type rune rune</pre>
  466. <p>
  467. rune is an alias for int32 and is equivalent to int32 in all ways. It is
  468. used, by convention, to distinguish character values from integer values.
  469. </p>
  470. <h2 id="string">type <a href="http://localhost:6060/src/builtin/builtin.go?s=2094:2112#L61">string</a></h2>
  471. <pre>type string string</pre>
  472. <p>
  473. string is the set of all strings of 8-bit bytes, conventionally but not
  474. necessarily representing UTF-8-encoded text. A string may be empty, but
  475. not nil. Values of string type are immutable.
  476. </p>
  477. <h2 id="uint">type <a href="http://localhost:6060/src/builtin/builtin.go?s=2403:2417#L69">uint</a></h2>
  478. <pre>type uint uint</pre>
  479. <p>
  480. uint is an unsigned integer type that is at least 32 bits in size. It is a
  481. distinct type, however, and not an alias for, say, uint32.
  482. </p>
  483. <h2 id="uint16">type <a href="http://localhost:6060/src/builtin/builtin.go?s=804:822#L18">uint16</a></h2>
  484. <pre>type uint16 uint16</pre>
  485. <p>
  486. uint16 is the set of all unsigned 16-bit integers.
  487. Range: 0 through 65535.
  488. </p>
  489. <h2 id="uint32">type <a href="http://localhost:6060/src/builtin/builtin.go?s=910:928#L22">uint32</a></h2>
  490. <pre>type uint32 uint32</pre>
  491. <p>
  492. uint32 is the set of all unsigned 32-bit integers.
  493. Range: 0 through 4294967295.
  494. </p>
  495. <h2 id="uint64">type <a href="http://localhost:6060/src/builtin/builtin.go?s=1026:1044#L26">uint64</a></h2>
  496. <pre>type uint64 uint64</pre>
  497. <p>
  498. uint64 is the set of all unsigned 64-bit integers.
  499. Range: 0 through 18446744073709551615.
  500. </p>
  501. <h2 id="uint8">type <a href="http://localhost:6060/src/builtin/builtin.go?s=705:721#L14">uint8</a></h2>
  502. <pre>type uint8 uint8</pre>
  503. <p>
  504. uint8 is the set of all unsigned 8-bit integers.
  505. Range: 0 through 255.
  506. </p>
  507. <h2 id="uintptr">type <a href="http://localhost:6060/src/builtin/builtin.go?s=2513:2533#L73">uintptr</a></h2>
  508. <pre>type uintptr uintptr</pre>
  509. <p>
  510. uintptr is an integer type that is large enough to hold the bit pattern of
  511. any pointer.
  512. </p>
  513. <div id="footer">
  514. Build version go1.6.<br>
  515. Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
  516. the content of this page is licensed under the
  517. Creative Commons Attribution 3.0 License,
  518. and code is licensed under a <a href="http://localhost:6060/LICENSE">BSD license</a>.<br>
  519. <a href="http://localhost:6060/doc/tos.html">Terms of Service</a> |
  520. <a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
  521. </div>
  522. </div><!-- .container -->
  523. </div><!-- #page -->
  524. <!-- TODO(adonovan): load these from <head> using "defer" attribute? -->
  525. <script type="text/javascript" src="../../lib/godoc/jquery.js"></script>
  526. <script type="text/javascript" src="../../lib/godoc/jquery.treeview.js"></script>
  527. <script type="text/javascript" src="../../lib/godoc/jquery.treeview.edit.js"></script>
  528. <script type="text/javascript" src="../../lib/godoc/godocs.js"></script>
  529. </body>
  530. </html>