Golang - Insert element to the sepcific position of slice



If we want to insert element to index i, there is code :

arr = append(arr[:i+1], arr[i:]...)
arr[i] = value