update for v12.1.1

Gerasimos (Makis) Maropoulos 2019-12-16 06:53:42 +02:00
parent 83b562f191
commit 952906eb2a
No known key found for this signature in database
GPG Key ID: 5DBE766BD26A54E7
2 changed files with 15 additions and 1 deletions

@ -21,7 +21,7 @@ module your_project_name
go 1.13
require (
github.com/kataras/iris/v12 v12.1.0
github.com/kataras/iris/v12 v12.1.1
)
```

@ -27,6 +27,20 @@ func notFound(ctx iris.Context) {
// when 404 then render the template
// $views_dir/errors/404.html
ctx.View("errors/404.html")
// OR, if you had more paths and you want
// to suggest relative paths to the user:
// suggestPaths := ctx.FindClosest(3)
// if len(suggestPaths) == 0 {
// ctx.WriteString("404 not found")
// return
// }
// ctx.HTML("Did you mean?<ul>")
// for _, s := range suggestPaths {
// ctx.HTML(`<li><a href="%s">%s</a></li>`, s, s)
// }
// ctx.HTML("</ul>")
}
func internalServerError(ctx iris.Context) {