Hi,
I'm quite happy about the generics so far, but now I'm trying some ideas that I don't know if they are possible or not given the current proposal.
My idea, is to create some kind of generic handler for "net/http" that could be used in a whole project.
It would allow same behavior on each routes (unmarshalling the request, validating it, calling the real business logic with a func(Request) (Response, error) style, handling the business logic error, marshalling the response).
This is currently impossible (that I know) without using some bad hacks (using an unmarshalling middleware and storing it in the context.Context), etc.
So here is my attempt using generics, but my example stopped on this error:
https://go2goplay.golang.org/p/NyvV47ozr7S