Repository navigation
Releases
v14.0.1
Version 14 release notes and reference: https://github.com/kataras/iris/releases/tag/v14.0.0 (read this first).
In-short, all valid opened issues are fixed.
Changelog: https://github.com/kataras/iris/blob/v14.0.1/HISTORY.md#fri-13-november-2026--v1401
v14.0.0
Iris v14 is the first new major version since v12. The module path is github.com/kataras/iris/v14 and it requires Go 1.27 or later.
go get github.com/kataras/iris/v14@v14.0.0package main
import "github.com/kataras/iris/v14"
type Book struct {
Title string `json:"title"`
}
func main() {
app := iris.New()
app.Get("/books/{id:uuid}", func(ctx iris.Context) {
ctx.JSON(iris.Map{"id": ctx.Params().GetString("id")})
})
app.Post("/books", func(ctx iris.Context) {
book, ok := ctx.BindJSON[Book]()
if !ok {
return
}
ctx.StatusCode(iris.StatusCreated)
ctx.JSON(book)
})
app.Listen(":8080")
}ctx.BindJSON[Book]() is a generic method, which is why v14 needs Go 1.27. It decodes the body, runs Validate() error when the type has one, and answers the client itself when either step fails.
What is new
iris.NewBuilderassembles an application in one compile-checked chain: CORS, compression, access logging, a health endpoint, error mapping, services and API groups.- Typed request binding on generic methods (
ctx.BindJSON[T](),ctx.BindUpdate[T]()) replaces hand-written decode blocks. rest/errors: handlers report errors and one central map turns them into canonical, machine-readable responses. Internal details go to the server log and never to the client.- A dependency injection container is built in and replaces
hero. Constructors declare what they need,Initializerhooks run at startup and closers run at shutdown. - JSON runs on
encoding/json/v2. - Thirty-one built-in middleware, API keys being the newest. Sessions, cache, i18n, versioning and websocket now live under
middleware/. - Authentication at every scale: Basic Auth typed by your own user type, API keys, a generic JWT SDK, an identity server and an OAuth2 provider.
ai: renders and relays streamed model output over HTTP (text deltas, reasoning traces, tool-call fragments, usage). It is provider-agnostic and ships no vendor SDK.client: an HTTP client for calling other services under the same JSON rules the server side uses.- Views are a middleware.
middleware/viewholds a one-methodEngineinterface. The HTML, Django, Handlebars, Jet, Pug and Ace engines moved to iris-contrib/views, and kataras/blocks works as it is. - Server options:
app.Run(iris.ServerOptions{...})replacesiris.Addr,iris.TLSandiris.AutoTLS. ngrok tunneling is opt-in through a blank import ofcore/server/ngrok. - MVC controllers on Go generics, in
controller/mvc.
Upgrading from v12
Every removed v12 name fails at compile time, so the compiler's error list is your to-do list. MIGRATION.md maps each name to its replacement. It opens with a prompt that you can paste into a coding agent, which then does the mechanical part.
The replacements most applications meet first:
| v12 | v14 |
|---|---|
github.com/kataras/iris/v12 |
github.com/kataras/iris/v14 |
iris.Party, app.Party(prefix) |
iris.Router, app.Router(prefix) |
iris.Configuration, iris.With... |
iris.Options |
iris.Addr, iris.TLS, iris.AutoTLS |
app.Run(iris.ServerOptions{...}) |
ctx.URLParam("q") |
ctx.Query().Get("q") |
ctx.Params().Get("id") |
ctx.Params().GetString("id") |
ctx.Header(k, v) to set, ctx.GetHeader(k) to read |
ctx.SetHeader(k, v) to set, ctx.Header(k) to read |
app.RegisterView(engine), ctx.View(...) |
app.Use(view.Handler(engine)), view.Render(ctx, ...) |
hero |
the built-in DI container |
middleware/logger |
middleware/accesslog |
middleware/recover |
middleware/recovery |
sessions, cache, websocket, i18n, view, versioning |
the same names under middleware/ |
mvc |
controller/mvc |
x/errors, x/client, x/jsonx |
rest/errors, client, rest/types |
Defaults that changed
The compiler does not flag these, so read them before you deploy:
- Session cookies are
SecureandSameSite=Lax. - JWT tokens are read from the
Authorizationheader only. - CORS no longer advertises credentials together with a wildcard origin.
ctx.SetCookiereplaces a cookie with the same name, path and domain, andctx.AddCookiedefaults toSameSite=Lax.- JSON is encoded and decoded by
encoding/json/v2.
MIGRATION.md explains each one, and lists the v12 bugs whose fixes change what you observe.
v12
Nothing changes for an application that imports github.com/kataras/iris/v12. That code stays on the v12 branch, and v12.2.12 is its latest release.
Documentation
- The Iris book: 24 chapters, free to read at iris-go.com/docs and to download as a PDF.
- TUTORIAL.md builds a Bookshelf service one idea at a time.
- 78 runnable examples in the order of the book.
- HISTORY.md lists every change in this release.
skill/iris: 21 reference documents written for coding agents.
Related repositories
- iris-contrib/views: the template engines.
- iris-contrib/middleware: 13 community middleware modules, updated for v14.
- kataras/blocks v0.1.0:
html/templatewith layouts and partials.
Found a problem? Open an issue.
v12.2.12
This release tags everything that landed on main since v12.2.11. From now on the v12 code lives on the v12 branch, and main moves on to v14, which has its own import path. Nothing changes for your imports: v12 is still github.com/kataras/iris/v12.
Upgrade with go get github.com/kataras/iris/v12@latest.
What's new
- The module now requires Go 1.26 (v12.2.11 required 1.22).
- Dependencies are at their newest versions.
golang.org/x/cryptogoes from v0.31.0 to v0.59.0 andgolang.org/x/netfrom v0.26.0 to v0.62.0, which brings in their security fixes. sessions/sessiondb/badgermoves from badger v2 to v4. Its import is nowgithub.com/dgraph-io/badger/v4.x/jsonx:ISO8601parses timestamps with an unconventional offset, such as2024-05-21T18:06:07.000000-04:01:19.x/jsonx: newSeasonbitmask type and aGetSeasonByDate(SimpleDate)helper.x/errors: when a response body cannot be encoded because of aNaNvalue, the error reports which field holds it.macro/interpreter/token:Typehas aString()method. A token type prints as its name (LBRACE) instead of a number.- New Arabic translation of the README: README_AR.md (#2539).
- Documentation and example links point to the
v12branch, and CI runs on it.
Known issue
Keep github.com/kataras/golog at v0.1.12 and github.com/kataras/pio at v0.0.13 (#2587). Running go get -u in your app pulls golog v0.2.0 and pio v0.0.14, and Iris v12 does not compile against them. If your build breaks after an upgrade, run go get github.com/kataras/golog@v0.1.12 github.com/kataras/pio@v0.0.13.
Full changelog: v12.2.11...v12.2.12
v12.2.11
Project Update: Iris is Evolving 🌱
Dear Iris Community,
You might have noticed a recent lull in activity on the Iris repository. I want to assure you that this silence is not without reason. For the past 3-4 months, I've been diligently working on the next major release of Iris.
This upcoming version is poised to be a significant leap forward, fully embracing the Generics feature introduced in Go. We're not just stopping at Generics, though. Expect a suite of new features, enhancements, and optimizations that will elevate your development experience to new heights.
My journey with Go spans over 8 years, and with each year, my expertise and understanding of the language deepen. This accumulated knowledge is being poured into Iris, ensuring that the framework not only evolves with the language but also with the community's growing needs.
Stay tuned for more updates, and thank you for your continued support and patience. The wait will be worth it.
Warm regards,
Gerasimos (Makis) Maropoulos
Release v12.2.11
This is the last release for the version 12 family.
New Contributors
HISTORY: https://github.com/kataras/iris/blob/v12/HISTORY.md#thu-25-april-2024--v12211
Full Changelog: v12.2.10...v12.2.11
v12.2.10
v12.2.9
v12.2.8
What's Changed
Read at: https://github.com/kataras/iris/blob/main/HISTORY.md#sun-05-nov-2023--v1228
- add fuzz driver based on TestUseRouterParentDisallow by @secsys-go in #2217
- fix #2216 by @fubuki8087 in #2218
- Bump github.com/redis/go-redis/v9 from 9.2.0 to 9.2.1 by @dependabot in #2219
- Bump github.com/vmihailenco/msgpack/v5 from 5.3.5 to 5.4.0 by @dependabot in #2220
- Bump github.com/shirou/gopsutil/v3 from 3.23.8 to 3.23.9 by @dependabot in #2221
- FIX: Session.Destroy trigger map concurrency write by @zxfishhack in #2225
- chore: enable caching for CI by @alexandear in #2257
- Bump go.etcd.io/bbolt from 1.3.7 to 1.3.8 by @dependabot in #2261
- Bump github.com/vmihailenco/msgpack/v5 from 5.4.0 to 5.4.1 by @dependabot in #2262
- Bump github.com/google/uuid from 1.3.1 to 1.4.0 by @dependabot in #2263
- Bump github.com/tdewolff/minify/v2 from 2.19.10 to 2.20.0 by @dependabot in #2264
- Bump github.com/nats-io/nkeys from 0.4.4 to 0.4.6 by @dependabot in #2268
- Bump github.com/redis/go-redis/v9 from 9.2.1 to 9.3.0 by @dependabot in #2275
- Bump github.com/shirou/gopsutil/v3 from 3.23.9 to 3.23.10 by @dependabot in #2276
- Bump github.com/tdewolff/minify/v2 from 2.20.0 to 2.20.5 by @dependabot in #2277
New Contributors
- @secsys-go made their first contribution in #2217
- @fubuki8087 made their first contribution in #2218
- @zxfishhack made their first contribution in #2225
- @alexandear made their first contribution in #2257
Full Changelog: v12.2.7...v12.2.8
v12.2.7
Read more at: https://github.com/kataras/iris/blob/main/HISTORY.md#mon-25-sep-2023--v1227
Full Changelog: v12.2.5...v12.2.7
v12.2.5
What's Changed
- Add optional
Singleton() boolmethod to controllers to mark them as singleton, will panic with a specific error if a controller expects dynamic dependencies. This behavior is idendical to the app-drivenapp.EnsureStaticBindings(). - Non-zero fields of a controller that are marked as ignored, with
ignore:"true"field tag, they are not included in the dependencies at all now. - Re-add error log on context rich write (e.g. JSON) failures when the application is running under debug mode (with
app.Logger().SetLevel("debug")) and there is no a registered context error handler at place. masterbranch finally renamed tomain. Don't worry GitHub will still navigate anymasterrequest tomainautomatically. Examples, Documentation and other Pages are refactored too.- Translate README to Vietnamese by @TrungKenbi in #2182
- add Japanese README by @demouth in #2188
- Remove redundant nil check by @Juneezee in #2194
- Improve middleware/requestid test suite by @lemuelroberto in #2191
- Bump github.com/redis/go-redis/v9 from 9.0.5 to 9.1.0 by @dependabot in #2190
New Contributors
- @TrungKenbi made their first contribution in #2182
- @demouth made their first contribution in #2188
- @Juneezee made their first contribution in #2194
- @lemuelroberto made their first contribution in #2191
Full Changelog: v12.2.4...v12.2.5
v12.2.4
What's Changed
Add new iris.WithDynamicHandler option (EnableDynamicHandler setting) to work with iris.Application.RefreshRouter method. It allows to change the entire router while your server is up and running. Handles issue #2167. Example at _examples/routing/route-state/main.go.
Full Changelog: v12.2.1...v12.2.4