News for hackers. Stuff that matters.
Re:A quick and easy way to setup a RESTful JSON API in Go by rakoo on Saturday April 26, 2014 @07:21AM (#7651046)
I'm pretty sure the map here is not the important part. The example demonstrates how to use the rest interface to talk with a store. The actual implementation of the store is up to you.
Re:A quick and easy way to setup a RESTful JSON API in Go by skj on Saturday April 26, 2014 @09:38AM (#7651328)
I think it's important for example code to also be correct. If it needs to gloss over some details, put them in a function call that isn't defined.

Using an unprotected map here is incorrect.

Re:A quick and easy way to setup a RESTful JSON API in Go by lazyjones on Saturday April 26, 2014 @05:17PM (#7652783)
Absolutely! Example code affects programming style and teaches people. It should be correct (and in good style), this is probably very much underrated.