Package martini is a powerful package for quickly writing modular web applications/services in Golang. Env is the environment that Martini is executing in. The MARTINI_ENV is read on initialization to set this variable. BeforeFunc is a function that is called before the ResponseWriter has been written to. ClassicMartini represents a Martini with some reasonable defaults. Embeds the router functions for convenience. Classic creates a classic Martini with some basic default middleware - martini.Logger, martini.Recovery and martini.Static. Classic also maps martini.Routes as a service. Context represents a request context. Services can be mapped on the request level from this interface. Handler can be any callable function. Martini attempts to inject services into the handler's argument list. Martini will panic if an argument could not be fullfilled via dependency injection.
Features
- Extremely simple to use
- Non-intrusive design
- Plays nice with other Golang packages
- Awesome path matching and routing
- Modular design, easy to add functionality, easy to rip stuff out
- Lots of good handlers/middlewares to use
- Great 'out of the box' feature set