On Fri, Aug 11, 2017 at 9:03 PM, Jens Hausherr <[email protected]> wrote:
> I see,
>
> I was just confused by the fact that fmt.Printf("%q/%v") apparently renders
> a nil array as an empty array ([]) while rendering other nil values (e.g.
> pointers) as <nil>.

Yep, a nil slice is also an empty slice. You can check it's length
(which will be zero), check it's capacity(which will be zero), range
over all the items it contains (which will be zero) and append items
to it.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to