Check out example codes for "go slice initialization". It will help you in understanding the concepts better.

Code Example 1

mySlice := []int{1, 2, 3, 4, 5}

Learn ReactJs, React Native from akashmittal.com