You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After playing around with alice for a bit, I was wondering, might it be a good idea to provide a Constructor alternative whose signature is func(http.HandlerFunc) http.HandlerFunc? All my middleware are just handler functions, and so I have to do http.HandlerFunc(myMiddlewareFunc) before passing them into alice. This is not a big deal, but since there is also a .ThenFunc alternative to the .Then function to pass in the final handler, I was wondering if there is a reason not to provide the same flexibility for the middleware? I am not sure though what a good name for that alternative Constructor type would be since ConstructorFunc doesn't feel right to me.
The text was updated successfully, but these errors were encountered:
After playing around with alice for a bit, I was wondering, might it be a good idea to provide a
Constructor
alternative whose signature isfunc(http.HandlerFunc) http.HandlerFunc
? All my middleware are just handler functions, and so I have to dohttp.HandlerFunc(myMiddlewareFunc)
before passing them into alice. This is not a big deal, but since there is also a.ThenFunc
alternative to the.Then
function to pass in the final handler, I was wondering if there is a reason not to provide the same flexibility for the middleware? I am not sure though what a good name for that alternativeConstructor
type would be sinceConstructorFunc
doesn't feel right to me.The text was updated successfully, but these errors were encountered: