package main import "fmt" func main() { v := []int{1, 2, 3} for i := range v { v = append(v, i) } fmt.Println(v) } // Output: // [1 2 3 0 1 2]