Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2023-01-08 05:46:11
Size: 706
Comment:
Revision 5 as of 2025-10-10 15:11:03
Size: 646
Comment: Rewrite
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Go Data Types = ## page was renamed from Go/DataTypes
= Go Numerics =

Go offers several '''numerics''' defined by their size and behavior.
Line 9: Line 12:
== String == == Description ==
Line 11: Line 14:
----



== Bool ==

----



== Numeric Types ==
The integer types are:
Line 26: Line 19:
 * floating point numbers: `float32` and `float64`
 * complex numbers: `complex64` and `complex128`
Line 29: Line 20:
`byte` is an alias to `uint8`, and `rune` is an alias to `int32`. There are also two floating point types defined by size: `float32` and `float64`.
Line 31: Line 22:
---- Lastly, there are two complex types defined by size: `complex64` and `complex128`.
Line 33: Line 24:


== Pointer ==

----



== Struct ==

----



== Function ==

----


== Container Types ==

 * `array`
 * `slice`
 * `map`

----



== Channel ==

----



== Interface ==
Note that `byte` is an alias to `uint8`, and `rune` is an alias to `int32`.

Go Numerics

Go offers several numerics defined by their size and behavior.


Description

The integer types are:

  • signed integers: int8, int16, int32, int64, and int

  • unsigned integers: uint8, uint16, uint32, uint64, and uint

  • uintptr

There are also two floating point types defined by size: float32 and float64.

Lastly, there are two complex types defined by size: complex64 and complex128.

Note that byte is an alias to uint8, and rune is an alias to int32.


CategoryRicottone

Go/Numerics (last edited 2025-10-10 15:11:03 by DominicRicottone)