Go Array Zero Values


As per the Go blog:

Arrays do not need to be initialized explicitly; the zero value of an array is a ready-to-use array whose elements are themselves zeroed

For example, myIntArray is initialized with the zero value of int, which is 0:

var myIntArray [5]int     // an array of five 0's: [0, 0, 0, 0, 0]