WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Go - Data Types


Go - Data Types of a variable determines how lots area it occupies in storage and how the bit pattern stored is interpreted.

There are following type in Go can be categorized as follows:
Sr.No. Types and Description
1

Boolean kinds

They are boolean kinds and includes the 2 predefined constants: (a) actual (b) fake

2

Numeric types

They are again arithmetic sorts and that they represents a) integer types or b) floating point values throughout this system.

3

String kinds

A string kind represents the set of string values. Its cost is a sequence of bytes. Strings are immutable types that is once created, it isn't feasible to trade the contents of a string. The predeclared string kind is string.

4

Derived sorts

They include (a) Pointer sorts, (b) Array kinds, (c) Structure types, (d) Union kinds and (e) Function kinds f) Slice sorts g) Interface kinds h) Map types i) Channel Types

Array sorts and shape types are together referred to as mixture sorts.

Integer Types

There are following architecture-independent integer sorts :
Sr.No. Types and Description
1

uint8

Unsigned eight-bit integers (0 to 255)

2

uint16

Unsigned 16-bit integers (zero to 65535)

3

uint32

Unsigned 32-bit integers (0 to 4294967295)

4

uint64

Unsigned 64-bit integers (zero to 18446744073709551615)

5

int8

Signed 8-bit integers (-128 to 127)

6

int16

Signed sixteen-bit integers (-32768 to 32767)

7

int32

Signed 32-bit integers (-2147483648 to 2147483647)

8

int64

Signed 64-bit integers (-9223372036854775808 to 9223372036854775807)

Floating Types

There are following structure-unbiased float sorts are
Sr.No. Types and Description
1

float32

IEEE-754 32-bit floating-factor numbers

2

float64

IEEE-754 sixty four-bit floating-point numbers

three

complex64

Complex numbers with float32 actual and imaginary parts

4

complex128

Complex numbers with float64 real and imaginary parts

Other Numeric Types

There are following a set of numeric kinds with implementation-unique sizes
Sr.No. Types and Description
1

byte

equal as uint8

2

rune

equal as int32

3

uint

32 or 64 bits

four

int

identical length as uint

five

uintptr

an unsigned integer to shop the uninterpreted bits of a pointer price