I am adding to a map[[]byte]int
concurrently from multiple go routines
.
Will I get a runtime panic for doing this?
I don't care if data in the map
becomes corrupted, because it can't , I am only inserting a value once and never again. But I can't get a runtime panic because the whole porgram will abort.
Maps are not safe for concurrent writes. Use a mutex to access it safely.
Furthermore map[[]byte]int
is not valid -- the key must be comparable. Slices are not comparable.