(app *iris.Application)
| 16 | const notFoundHTML = "<h1> custom http error page </h1>" |
| 17 | |
| 18 | func registerErrors(app *iris.Application) { |
| 19 | // set a custom 404 handler |
| 20 | app.OnErrorCode(iris.StatusNotFound, func(ctx iris.Context) { |
| 21 | ctx.HTML(notFoundHTML) |
| 22 | }) |
| 23 | } |
| 24 | |
| 25 | func registerGamesRoutes(app *iris.Application) { |
| 26 | gamesMiddleware := func(ctx iris.Context) { |
no test coverage detected
searching dependent graphs…