Comment on A new experimental Go API for JSONparentComments−tux31yThis is indeed a nil slice, and it does have len() == 0, but Go also has a concept of empty slices separate from nil slicesThe language just has a bad habit of confusing them some of the time, but not consistently, so you can still occasionally get bit by the differenceAs someone who uses Go a lot, it's just one of those things...
Comments
This is indeed a nil slice, and it does have len() == 0, but Go also has a concept of empty slices separate from nil slices
The language just has a bad habit of confusing them some of the time, but not consistently, so you can still occasionally get bit by the difference
As someone who uses Go a lot, it's just one of those things...