// Handler create nova.HandlerFunc, injects modules
Handler create nova.HandlerFunc, injects modules
// Handler create nova . HandlerFunc injects modules
func Handler(opt xlog.Options) nova.HandlerFunc {
	var err error
	var db *outputs.MongoDB
	if db, err = outputs.DialMongoDB(opt); err != nil {
		panic(err)
	}
	return func(c *nova.Context) (err error) {
		c.Values[DatabaseContextKey] = db
		c.Next()
		return
	}
}
func Handler ( opt xlog . Options ) nova . HandlerFunc { var err error var db * outputs . MongoDB if db , err = outputs . DialMongoDB ( opt ) ; err != nil { panic ( err ) } return func ( c * nova . Context ) ( err error ) { c . Values [ DatabaseContextKey ] = db c . Next ( ) return } }
Handler create nova.HandlerFunc, injects modules
Handler create nova . HandlerFunc injects modules
// panic if failed to dial database