3 ms·
Quick Go question. I haven't done much go coding at all, but play around with the language. I've been reading a lot about it (thanks to HN). So I was now lookin
by nixarn 14y ago
Quick Go question. I haven't done much go coding at all, but play around with the language. I've been reading a lot about it (thanks to HN). So I was now looking at the Slices section and noticed a slice being initalize as:
t := []int{1, 2, 3, 4, 5}
What makes that a slice and not an array?
EDIT: Ok, found that answer on google go's blog. Apparently leaving out the length makes it one.