You can create an array in two ways:
numbers := [5]int{1, 2, 3, 4, 5}
numbers := [...]int{1, 2, 3, 4, 5}They are similar to arrays, but you do not specify the size:
array := []int{1, 2, 3, 4, 5}You can create slices using the built-in function make:
slice := make([]int, 4) // This will create [0 0 0 0]You can know the coverage of your test using:
go test -coverMore info: https://blog.golang.org/slices-intro