[Go]Pointers

9Pointer is a variable that stores the memory address/register of the variable. If you extract the pointer variable without the asterix(*) sign, you will only get the register of the variable. In order to get the value you need to de-reference the pointer variable by using the asterix(*).

Advertisements

[Go]Slice

While array in Go is fixed size, slice on the other hand is not. You declare a variable without specifying the size, and if new element is needed use the append() function to add element to each index.