HNHacker News
TopNewBestAskShowJobs

cronos

467 karma · joined October 13, 2012

submissionscomments
cronos··on Sane Concurrency with Go
I believe you have a race in that code on error channel. You can't guarantee that the value you send on it will be received by correct receiver. If you have 2 concurrent transfers and one errors and the other succeds, second one may receive an error intended for the first one.
cronos··on A RESTful Micro-Framework in Go
Why exactly do Resource's methods take variadic argument? In what scenario can there be more than one?

Also, small remarks about code: You define type HandleFunc in your package which is identical to http.HandlerFunc. Looks like it can be removed. Some error logging (rw.Write, json.Marshal) would be useful as well.

← PreviousPage 2 of 2