// initWeb installed a new Web instance onto the provided app object. func initWeb(app *App) { app.web = &Web{ router: web.New(), requestTimer: metrics.NewTimer(), failureMeter: metrics.NewMeter(), successMeter: metrics.NewMeter(), } // register problems problem.RegisterError(sql.ErrNoRows, problem.NotFound) problem.RegisterError(sequence.ErrNoMoreRoom, problem.ServerOverCapacity) }
// initWeb installed a new Web instance onto the provided app object. func initWeb(app *App) { app.web = &Web{ router: web.New(), requestTimer: metrics.NewTimer(), failureMeter: metrics.NewMeter(), successMeter: metrics.NewMeter(), } // register problems problem.RegisterError(db.ErrNoResults, problem.NotFound) }