Closed
Description
by peterbourgon:
In the spec, under "For statements", the topic of deleting map entries during iteration is addressed with only the sentence: > If map entries that have not yet been reached are removed during iteration, the corresponding iteration values will not be produced. This program appears to work fine: > http://play.golang.org/p/P-O47Wp2LF But the spec doesn't seem to *guarantee* that it will work. If this is guaranteed behavior, can the spec be clarified? Specifically, can this sentence (or one like it) be added: > The current entry in a map iteration may be safely deleted.