From 2c9fcaa586271d117e172b696ee1ad3a52c8afdf Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Fri, 22 Nov 2019 15:16:50 +0200 Subject: [PATCH] update middleware list --- middleware/README.md | 7 ++++--- middleware/i18n/i18n.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/middleware/README.md b/middleware/README.md index b4402aac46..46b6f3ecef 100644 --- a/middleware/README.md +++ b/middleware/README.md @@ -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. @@ -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: diff --git a/middleware/i18n/i18n.go b/middleware/i18n/i18n.go index 260ac83d81..3447fbb8a1 100644 --- a/middleware/i18n/i18n.go +++ b/middleware/i18n/i18n.go @@ -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"