Merge branch 'v12'

Former-commit-id: 75eb6c5748abef067ddd389285f35fccc7aac44e
This commit is contained in:
minhvh93 2019-12-02 22:24:40 +07:00
commit fe02ad938a
2 changed files with 5 additions and 4 deletions

View File

@ -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:

View File

@ -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"