Iris Web Framework


Iris is a fast, batteries-included web framework for Go. It gives your next API or website expressive routing with typed path parameters, one place for error handling, dependency injection that keeps code testable, and production defaults that are secure out of the box.
Version 14 is the largest release in the project's history. The framework was rebuilt around Go generics: a compile-enforced application builder, typed request helpers that validate for you, controllers resolved by the dependency container, and an error pipeline you configure once. HISTORY.md records everything new; the Migration Guide brings v12 applications forward in one sitting.
🤖 Ask AI about Iris. Google's free Code Wiki for Iris is generated from this repository and stays in sync with it, commit by commit. Browse the architecture with diagrams, or ask its chat plain-language questions about the codebase and get answers grounded in the actual source. For an assistant that writes Iris code with you, Plexon AI, the desktop assistant built by the author of Iris, ships the Iris skill built in. The same skill installs into Claude Code as a plugin; see AI Tools for Iris below.
Learn what others say about Iris and star this open-source project to support its development. Curious about speed? See the server benchmarks.

package main
import "github.com/kataras/iris/v14"
func main() {
app := iris.New()
app.Get("/", func(ctx iris.Context) {
ctx.JSON(iris.Map{"message": "Hello, World!"})
})
app.Get("/greet/{name:string}", func(ctx iris.Context) {
ctx.WriteString("Hello, " + ctx.Params().GetString("name"))
})
app.Listen(":8080")
}
The production stack, in one expression
Real applications use iris.NewBuilder: a compile-enforced chain that wires
CORS, compression, access logs, a health endpoint, your error map, your
services and your API groups. The compiler rejects wrong step order.
iris.NewBuilder().
Prefix("/api").
AllowOrigin("*").
Compression(true).
LogRequests(true).
Health(true, "production", "kataras").
Errors(errors.NewOptions().
MapErrors(errors.NotFound, catalog.ErrNotFound)).
Services(catalog.NewRepository, catalog.NewService).
RouterMiddlewares().
Middlewares().
API("/products", api.NewProductsAPI).
Build().
Listen(":8080")
Handlers stay six lines long, because decoding, validation and error
rendering happen in one configured place: