golang append array to slice
Slices in Go are very convenient way to deal with dynamic arrays. However, they dont always behave as one may expect.
In chapter 3 we learned about Gos basic types.Go includes two built-in functions to assist with slices: append and copy. Here is an example of append: func main() slice1 : int1,2,3 slice2 : append(slice1, 4, 5) fmt.Println( slice1, slice2) .