On Thu, 07 Jul 2016 14:19:17 +0000 Jan Mercl <0xj...@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. Indeed, given that "normal" iteration -- using a variable for the map values -- works as one would expect it to: https://play.golang.org/p/phmsYAov7S -- 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.