https://github.com/julienschmidt/httprouter https://github.com/pressly/chi and
others actually use a function by default because it's the more common
case. See https://github.com/pressly/chi/issues/94#issuecomment-254516724
On Mon, Nov 21, 2016 at 12:39 AM Tamás Gulácsi wrote:
> I don't think
I don't think so. A http.Handler usually has a ton of state, so a struct's
method is handier than a closure.
And take a look at http.HandlerFunc!
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving e
In relation to this question, do you guys think it would have been better
had http.Handler been a function, not an interface?
On Sun, Nov 20, 2016 at 11:23 PM Henry wrote:
> Thanks for the replies. In terms of future extensibility, is it safe to
> say that interface is superior to first-class fu