Skip to content

Commit

Permalink
Merge branch 'master' into fix/GO-2023-1988
Browse files Browse the repository at this point in the history
# Conflicts:
#	go.mod
#	go.sum
  • Loading branch information
trungdlp-wolffun committed Aug 10, 2023
2 parents 412d4fc + 628473e commit 21364a2
Show file tree
Hide file tree
Showing 147 changed files with 1,508 additions and 1,678 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:

strategy:
matrix:
go_version: [1.19.x]
go_version: [1.20.x]
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go_version }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Test
run: go test -v ./...
Expand Down
48 changes: 46 additions & 2 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,50 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whene

**How to upgrade**: Open your command-line and execute this command: `go get github.com/kataras/iris/v12@latest` and `go mod tidy -compat=1.20`.

# Next

Changes apply to `master` branch.

- Add `mvc.Application.EnableStructDependents()` method to handle [#2158](https://github.com/kataras/iris/issues/2158).

- Fix [iris-premium#17](https://github.com/kataras/iris-premium/issues/17).

- Replace [russross/blackfriday](github.com/russross/blackfriday/v2) with [gomarkdown](https://github.com/gomarkdown/markdown) as requested at [#2098](https://github.com/kataras/iris/issues/2098).

- Add `mvc.IgnoreEmbedded` option to handle [#2103](https://github.com/kataras/iris/issues/2103). Example Code:

```go
func configure(m *mvc.Application) {
m.Router.Use(cacheHandler)
m.Handle(&exampleController{
timeFormat: "Mon, Jan 02 2006 15:04:05",
}, mvc.IgnoreEmbedded /* BaseController.GetDoSomething will not be parsed at all */)
}

type BaseController struct {
Ctx iris.Context
}

func (c *BaseController) GetDoSomething(i interface{}) error {
return nil
}

type exampleController struct {
BaseController

timeFormat string
}

func (c *exampleController) Get() string {
now := time.Now().Format(c.timeFormat)
return "last time executed without cache: " + now
}
```

- Add `LoadKV` method on `Iris.Application.I18N` instance. It should be used when no locale files are available. It loads locales via pure Go Map (or database decoded values).

- Remove [ace](https://github.com/eknkc/amber) template parser support, as it was discontinued by its author more than five years ago.

# Sa, 11 March 2023 | v12.2.0

This release introduces new features and some breaking changes.
Expand All @@ -41,7 +85,7 @@ All new features have been tested in production and seem to work fine. Fixed all
- Add `Context.Render` method for compatibility.

- Support of embedded [locale files](https://github.com/kataras/iris/blob/master/_examples/i18n/template-embedded/main.go) using standard `embed.FS` with the new `LoadFS` function.
- Support of direct embedded view engines (`HTML, Blocks, Django, Handlebars, Pug, Amber, Jet` and `Ace`) with `embed.FS` or `fs.FS` (in addition to `string` and `http.FileSystem` types).
- 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.
Expand Down Expand Up @@ -306,7 +350,7 @@ func main() {
- Fix Response Recorder `Clone` concurrent access afterwards.

- Add a `ParseTemplate` method on view engines to manually parse and add a template from a text as [requested](https://github.com/kataras/iris/issues/1617). [Examples](https://github.com/kataras/iris/tree/master/_examples/view/parse-template).
- Full `http.FileSystem` interface support for all **view** engines as [requested](https://github.com/kataras/iris/issues/1575). The first argument of the functions(`HTML`, `Blocks`, `Pug`, `Amber`, `Ace`, `Jet`, `Django`, `Handlebars`) can now be either a directory of `string` type (like before) or a value which completes the `http.FileSystem` interface. The `.Binary` method of all view engines was removed: pass the go-bindata's latest version `AssetFile()` exported function as the first argument instead of string.
- Full `http.FileSystem` interface support for all **view** engines as [requested](https://github.com/kataras/iris/issues/1575). The first argument of the functions(`HTML`, `Blocks`, `Pug`, `Ace`, `Jet`, `Django`, `Handlebars`) can now be either a directory of `string` type (like before) or a value which completes the `http.FileSystem` interface. The `.Binary` method of all view engines was removed: pass the go-bindata's latest version `AssetFile()` exported function as the first argument instead of string.

- Add `Route.ExcludeSitemap() *Route` to exclude a route from sitemap as requested in [chat](https://chat.iris-go.com), also offline routes are excluded automatically now.

Expand Down
8 changes: 4 additions & 4 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Revision ID: 5fc50a00491616d5cd0cbce3abd8b699838e25ca
4e134eadfa
bbolt a8af23b57f672fe https://github.com/etcd-io/bbolt
f05637de531bba5
aa00013364
blackfriday d3b5b032dc8e892 https://github.com/russross/blackfriday
7d31a5071b56e14
c89f045135
aa00013364
markdown 2ced44d5b58482a https://github.com/gomarkdown/markdown
9b77d1abad4c3d3
4b190880fe
bluemonday 0a75d7616912ab9 https://github.com/microcosm-cc/bluemonday
beb9cc6f7283ec1
917c61b135
Expand Down
Loading

0 comments on commit 21364a2

Please sign in to comment.