Check out example codes for "how to manually allocate memory in golang". It will help you in understanding the concepts better.

Code Example 1

package main

import "fmt"

func main(){

   ptr := new(int)
   *ptr = 100

   fmt.Println("*ptr = ", *ptr)

   slice := make([]int, 10)    // slice with len(slice) == cap(slice) == 10

   for i:=0; i<len(slice); i++{
      fmt.Println(slice[i])
   }
}

Learn ReactJs, React Native from akashmittal.com