So many good answers! Lots of different ways to accomplish this. I'll say that in this specific case, which is does not require every ounce of performance, syncmap is by far the simplest and least amount of code, so readability wins on this one.
-- 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.