...

Web Technologies - Go Language

Back to Course

Lesson Description


Lession - #352 Go-Data Types


Go - Data Types

In the Go programming language, information types allude to a broad framework utilized for announcing factors or elements of various sorts. The sort of a variable decides how much space it involves away and how the piece design put away is deciphered.

Sr.No. Types and Description
1 Boolean types They are boolean types and comprises of the two predefined constants: (a>
valid (b>
bogus
2 Numeric types They are again math types and they addresses a>
number sorts or b>
drifting point values all through the program.
3 String types A string type addresses the arrangement of string values. Its worth is a succession of bytes. Strings are permanent sorts that is once made, changing the items in a string is beyond the realm of possibilities. The predeclared string type is string.
4 Derived types They incorporate (a>
Pointer types, (b>
Array types, (c>
Structure types, (d>
Union sorts and (e>
Function types f>
Slice types g>
Interface types h>
Map types I>
Channel Types


Cluster types and construction types are by and large alluded to as total kinds. The sort of a capacity determines the arrangement of all capacities with a similar boundary and result types. We will examine the essential kinds in the accompanying area, though different sorts will be canvassed in the impending sections.

Integer Types

The predefined architecture-independent integer types are −
Sr.No. Types and Description
1 uint8 Unsigned 8-bit integers (0 to 255>
2 uint16 Unsigned 16-bit integers (0 to 65535>
3 uint32 Unsigned 32-bit integers (0 to 4294967295>
4 uint64 Unsigned 64-bit integers (0 to 18446744073709551615>