Go’s numeric data types include several sizes of integers, floating-point numbers, and complex numbers. Each numeric type determines the size and signedness of its values. Let’s begin with integers.
Go provides both signed and unsigned integer arithmetic.
There are four distinct sizes of
signed integers—8, 16, 32, and 64 bits—represented by the types
int64, and corresponding unsigned
There are also two types called just
uint that are the
natural or most efficient size for signed and unsigned integers on a particular platform;
int is by far the most widely used numeric type. Both these types have the same size, either 32 or 64 bits, but one must not ...