This release introduces new features and some breaking changes.
The codebase for Dependency Injection, Internationalization and localization and more have been simplified a lot (fewer LOCs and easier to read and follow up).
24 Dec 2022
All new features have been tested in production and seem to work fine. Fixed all reported and reproducible bugs. The v12.2.0-beta7 is the latest beta release of v12.2.0. Expect the final public and stable release of v12.2.0 shortly after February 2023.
Breaking-change: HTML template functions yield, part, partial, partial_r and render now accept (and require for some cases) a second argument of the binding data context too. Convert: {{ yield }} to {{ yield . }}, {{ render "templates/mytemplate.html" }} to {{ render "templates/mytemplate.html" . }}, {{ partial "partials/mypartial.html" }} to {{ partial "partials/mypartial.html" . }} and so on.
Add new URLParamSeparator to the configuration. Defaults to "," but can be set to an empty string to disable splitting query values on Context.URLParamSlice method.
Support of embedded locale files using standard embed.FS with the new LoadFS function.
Support of direct embedded view engines (HTML, Blocks, Django, Handlebars, Pug, Jet and Ace) with embed.FS or fs.FS (in addition to string and http.FileSystem types).
Add support for embed.FS and fs.FS on app.HandleDir.
Add iris.Patches() package-level function to customize Iris Request Context REST (and more to come) behavior.
Minor fixes.
Enable setting a custom "go-redis" client through SetClient go redis driver method or Client struct field on sessions/database/redis driver as requested at chat.
Ignore "csrf.token" form data key when missing on ctx.ReadForm by default as requested at #1941.
New {x:weekday} path parameter type, example code:
// 0 to 7 (leading zeros don't matter) or "Sunday" to "Monday" or "sunday" to "monday".
// http://localhost:8080/schedule/monday or http://localhost:8080/schedule/Monday or
// http://localhost:8080/schedule/1 or http://localhost:8080/schedule/0001.
app.Get("/schedule/{day:weekday}", func(ctx iris.Context) {
day, _ := ctx.Params().GetWeekday("day")
ctx.Writef("Weekday requested was: %v\n", day)
})
Make the Context.JSON method customizable by modifying the context.WriteJSON package-level function.
Add new iris.NewGuide which helps you build a simple and nice JSON API with services as dependencies and better design pattern.
Make Context.Domain() customizable by letting developers to modify the Context.GetDomain package-level function.
Remove Request Context-based Transaction feature as its usage can be replaced with just the Iris Context (as of go1.7+) and better project structure.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/qor/admin/network/alerts).
Bumps github.com/kataras/iris/v12 from 12.1.8 to 12.2.0.
Release notes
Sourced from github.com/kataras/iris/v12's releases.
Changelog
Sourced from github.com/kataras/iris/v12's changelog.
... (truncated)
Commits
c9c13d7
Merge branch 'master' of https://github.com/kataras/iris946ea67
v12.2.0fc93c62
Bump google.golang.org/protobuf from 1.28.1 to 1.29.0 (#2097)005b829
Bump github.com/microcosm-cc/bluemonday from 1.0.22 to 1.0.23 (#2096)f7dc599
Bump golang.org/x/crypto from 0.6.0 to 0.7.0 (#2094)51a3637
Bump golang.org/x/text from 0.7.0 to 0.8.0 (#2093)5de9f41
Bump golang.org/x/sys from 0.5.0 to 0.6.0 (#2092)0473648
Bump github.com/shirou/gopsutil/v3 from 3.23.1 to 3.23.2 (#2090)b44d2dd
Bump github.com/klauspost/compress from 1.15.15 to 1.16.0 (#2089)dccd572
minorDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show