v0.13.0
One route, one line. go doc -all against 0.12.0 leaves di untouched and
adds dihttp.Handle; nothing changes shape or behaviour, and an upgrade
cannot break a caller.
Added
dihttp.Handle(method)makes anhttp.Handlerthat resolves a handler
type from the request's scope and calls one of its methods, named by a
method expression:mux.Handle("GET /users/{id}", dihttp.Handle((*Users).Show)).
One type per resource with a method per route replaces a type, a
registration and a closure per route. The type isScopedwhen it needs
the request and a plain singleton when it does not;Handlefollows
either. Nothing existing changes; an upgrade cannot break a caller.