Author.
Great points. They don't need to be variadic. I misunderstood the type of url.Values. And I didn't see http.HandlerFunc!
I eschewed error logging in the interest of simplicity.
Thanks for the corrections! Updating the article now.
Great points. They don't need to be variadic. I misunderstood the type of url.Values. And I didn't see http.HandlerFunc!
I eschewed error logging in the interest of simplicity.
Thanks for the corrections! Updating the article now.
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.