On Thu, Jul 7, 2016 at 4:06 PM Kyle Stanly <theif...@gmail.com> wrote:

> for k, m[k] := range m {...}
>
> Apparently is valid Go syntax, however what are the semantics behind this?

It is not a valid Go syntax. The short variable declaration syntax requires
variable names on its left side. You probably meant '=' instead of ':='.

> If another Goroutine calls delete(...)

Concurrent map updates and reading is a data race. Within the same
goroutine it works, but I did not expect the result I've got:
https://play.golang.org/p/ECno0PVdBF

It seems like a bug to me.

-- 

-j

-- 
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