Chain HTTP middleware with Alice
masterAlice provides a way to chain multiple HTTP middleware functions and an application handler using a fluent interface. Instead of manually nesting middleware calls like Middleware1(Middleware2(App)), you can use alice.New() to create a chain and .Then() to attach your final handler.
To use Alice, your middleware constructors must follow the signature:
func(http.Handler) http.Handler.
If a middleware does not follow this signature, you can wrap it in a compatible function.