Skip to content

Commit

Permalink
update middleware list
Browse files Browse the repository at this point in the history
  • Loading branch information
kataras committed Nov 22, 2019
1 parent 3a02e5b commit 2c9fcaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions middleware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ Builtin Handlers
| Middleware | Example |
| -----------|-------------|
| [basic authentication](basicauth) | [iris/_examples/authentication/basicauth](https://github.com/kataras/iris/tree/master/_examples/authentication/basicauth) |
| [Google reCAPTCHA](recaptcha) | [iris/_examples/miscellaneous/recaptcha](https://github.com/kataras/iris/tree/master/_examples/miscellaneous/recaptcha) |
| [localization and internationalization](i18n) | [iris/_examples/miscellaneous/i81n](https://github.com/kataras/iris/tree/master/_examples/miscellaneous/i18n) |
| [request logger](logger) | [iris/_examples/http_request/request-logger](https://github.com/kataras/iris/tree/master/_examples/http_request/request-logger) |
| [HTTP method override](methodoverride) | [iris/middleware/methodoverride/methodoverride_test.go](https://github.com/kataras/iris/blob/master/middleware/methodoverride/methodoverride_test.go) |
| [profiling (pprof)](pprof) | [iris/_examples/miscellaneous/pprof](https://github.com/kataras/iris/tree/master/_examples/miscellaneous/pprof) |
| [Google reCAPTCHA](recaptcha) | [iris/_examples/miscellaneous/recaptcha](https://github.com/kataras/iris/tree/master/_examples/miscellaneous/recaptcha) |
| [recovery](recover) | [iris/_examples/miscellaneous/recover](https://github.com/kataras/iris/tree/master/_examples/miscellaneous/recover) |

Experimental Handlers
Community made
------------

Most of the experimental handlers are ported to work with _iris_'s handler form, from third-party sources.
Expand All @@ -30,7 +31,7 @@ Most of the experimental handlers are ported to work with _iris_'s handler form,
Third-Party Handlers
------------

iris has its own middleware form of `func(ctx context.Context)` but it's also compatible with all `net/http` middleware forms. See [here](https://github.com/kataras/iris/tree/master/_examples/convert-handlers).
Iris has its own middleware form of `func(ctx context.Context)` but it's also compatible with all `net/http` middleware forms. See [here](https://github.com/kataras/iris/tree/master/_examples/convert-handlers).

Here's a small list of useful third-party handlers:

Expand Down
2 changes: 1 addition & 1 deletion middleware/i18n/i18n.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ type I18n struct {
locales map[string][]*ini.File
}

// If `Config.Default` is missing and `Config.Languages` or `Config.Map` contains this key then it will set as the default locale,
// If `Config.Default` is missing and `Config.Languages` or `Config.LanguagesMap` contains this key then it will set as the default locale,
// no need to be exported(see `Config.Default`).
const defLangCode = "en-US"

Expand Down

0 comments on commit 2c9fcaa

Please sign in to comment.