> On Oct 22, 2016, at 2:19 PM, Matt Harden <matt.har...@gmail.com> wrote:
> 
> and [...]int{5}[:] is also illegal (slice of unaddressable value)


[]int{5} will do the same thing, and I didn't know this until recently but the 
spec is written such that this even works with named indices:

        v := []int{
                5:      5,
        }
        fmt.Println(len(v))     // prints 6

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to