golang create slice of ones code example Example 1: go create list length vals := make([]int, 5) Example 2: create slice golang b := [2]string{"Penn", "Teller"}