whatsthecodeforthat.com

What's the code for Array Initialization in go?

Note: Technically the following initializes a slice instead of an array, which will be assumed in all of the following Go examples. Generally, slices are assumed to be used by default rather than arrays in Go.

arr := []type{val1, val2}