# Packages
Package di provides dependency injection for the Iris Hero and Iris MVC new features.
# Functions
Clone creates and returns a new hero with the default Dependencies.
Dependencies returns the dependencies collection if the default hero, those can be modified at any way but before the consumer `Handler`.
DispatchCommon is being used internally to send commonly used data to the response writer with a smart way.
DispatchErr writes the error to the response.
DispatchFuncResult is being used internally to resolve and send the method function's output values to the context's response writer using a smart way which respects status code, content type, content, custom struct and an error type.
Handler accepts a "handler" function which can accept any input arguments that match with the Hero's `Dependencies` and any output result; like string, int (string,int), custom structs, Result(View | Response) and anything you can imagine.
IsContext returns true if the "inTyp" is a type of Context.
New returns a new Hero, a container for dependencies and a factory for handlers and controllers, this is used internally by the `mvc#Application` structure.
Register adds one or more values as dependencies.
Try will check if "fn" ran without any panics, using recovery, and return its result as the final response otherwise it returns the "failure" response if any, if not then a 400 bad request is being sent.
# Variables
DefaultErrStatusCode is the default error status code (400) when the response contains an error which is not nil.
DefaultViewExt is the default extension if `view.Name `is missing, but note that it doesn't care about the app.RegisterView(iris.$VIEW_ENGINE("./$dir", "$ext"))'s $ext.
# Interfaces
Result is a response dispatcher.