- Go is a statically types language.
- tall varibles have assingned types.
- you can set types explicitly or implicitly.
- bool - true, false
- string - collection of characters
- integers - uint8, uint16, uint32, uint64 int8, int16, int32, int64
aliases can be used for these datatype : byte, uint, int, uintptr
- float - float32, float64
- complex (real and imaginary) - complex64, complex128
- arrays
- slices
- maps
- structs
- functions
- interfaces
- channels
- pointers
- += sum
- -+ difference
- *= product
- /+ quotient
- % remainder
- & bitwise AND
- | bitwise OR
- ^ bitwise XOR
- &^ bit clear
- << left shift
- >> right shift
-
Go runtime is statically linked to application
-
memory is allocated and deallocated automatically
-
use
make()ornew()to initialize maps, slices and channelsnew()
- allocates memory but does not initialize memory
- results in zeroed storage but returns a memory address
make()
- allocates and initializes memory
- allocates non-zeroed storage and returns a memory address