What is the difference, if any, in the following two slice declarations, and which one is more preferable? Technology Community › Category: Golang › What is the difference, if any, in the following two slice declarations, and which one is more preferable? 0 Vote Up Vote Down VietMX Staff asked 4 years ago Problem var a []int and a := []int{} The first declaration does not allocate memory if the slice is not used, so this declaration method is preferred.