I'm studying slices in golang and i learn how to initialize slices in two different ways:
func main() {
slice1 := make([]int, 5, 10)
slice1 = append(slice1, 1, 2, 3, 4)
slice2 := []int{1, 2, 3, 4}
}
what is the difference?
I'm search and found nothing about it, if someone can answer I'll be glad.