File tree Expand file tree Collapse file tree 8 files changed +37
-6
lines changed
Expand file tree Collapse file tree 8 files changed +37
-6
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,33 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whene
2121
2222** How to upgrade** : Open your command-line and execute this command: ` go get github.com/kataras/iris/v12@latest ` .
2323
24+ # Mo, 16 December 2019 | v12.1.1
25+
26+ Add [ Context.FindClosest(n int) [ ] string] ( https://github.com/kataras/iris/blob/master/_examples/routing/not-found-suggests/main.go#L22 )
27+
28+ ``` go
29+ app := iris.New ()
30+ app.OnErrorCode (iris.StatusNotFound , notFound)
31+ ```
32+
33+ ``` go
34+ func notFound (ctx iris .Context ) {
35+ suggestPaths := ctx.FindClosest (3 )
36+ if len (suggestPaths) == 0 {
37+ ctx.WriteString (" 404 not found" )
38+ return
39+ }
40+
41+ ctx.HTML (" Did you mean?<ul>" )
42+ for _ , s := range suggestPaths {
43+ ctx.HTML (` <li><a href="%s">%s</a></li>` , s, s)
44+ }
45+ ctx.HTML (" </ul>" )
46+ }
47+ ```
48+
49+ ![ ] ( https://iris-go.com/images/iris-not-found-suggests.png )
50+
2451# Fr, 13 December 2019 | v12.1.0
2552
2653## Breaking Changes
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ Los desarrolladores no están obligados a actualizar si realmente no lo necesita
2121
2222** Cómo actualizar** : Abra su línea de comandos y ejecute este comando: ` go get github.com/kataras/iris/v12@latest ` .
2323
24+ # Mo, 16 December 2019 | v12.1.1
25+
26+ Not translated yet, please navigate to the [ english version] ( HISTORY.md#mo-16-december-2019--v1211 ) instead.
27+
2428# Fr, 13 December 2019 | v12.1.0
2529
2630Not translated yet, please navigate to the [ english version] ( HISTORY.md#fr-13-december-2019--v1210 ) instead.
Original file line number Diff line number Diff line change 1- 12.1.0 :https://github.com/kataras/iris/releases/tag/v12.1.0
1+ 12.1.1 :https://github.com/kataras/iris/releases/tag/v12.1.1
Original file line number Diff line number Diff line change 44
55require (
66 github.com/betacraft/yaag v1.0.1-0.20191027021412-565f65e36090
7- github.com/kataras/iris/v12 v12.1.0
7+ github.com/kataras/iris/v12 v12.1.1
88)
Original file line number Diff line number Diff line change 44
55require (
66 github.com/googollee/go-socket.io v1.4.3-0.20191109153049-7451e2f8c2e0 // indirect
7- github.com/kataras/iris/v12 v12.1.0
7+ github.com/kataras/iris/v12 v12.1.1
88)
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ import (
1414 "runtime"
1515 "strings"
1616
17- "github.com/kataras/iris/core/netutil"
1817 "github.com/kataras/iris/v12/context"
18+ "github.com/kataras/iris/v12/core/netutil"
1919
2020 "github.com/BurntSushi/toml"
2121 "github.com/kataras/sitemap"
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ Source code and other details for the project are available at GitHub:
3838
3939Current Version
4040
41- 12.1.0
41+ 12.1.1
4242
4343Installation
4444
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ import (
3939)
4040
4141// Version is the current version number of the Iris Web Framework.
42- const Version = "12.1.0 "
42+ const Version = "12.1.1 "
4343
4444// HTTP status codes as registered with IANA.
4545// See: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml.
You can’t perform that action at this time.
0 commit comments