Iris helps you build Go APIs and websites with typed routes, centralized errors, dependency injection, and many built-in middleware pieces. Version 14 centers on a compile-checked application builder.
Overview
Iris is a Go web framework aimed at HTTP APIs and sites. It offers expressive routing with typed path parameters, macros, and constraints so invalid input fails before your handler runs.
The iris.NewBuilder pattern wires CORS, compression, access logging, health checks, error mapping, services, and API groups in an order the compiler enforces. Handlers can stay short because decoding, validation, and error rendering are configured once through rest helpers and a central error map.
Dependency injection resolves controllers and services from constructors, with startup and shutdown hooks. The stack includes extensive middleware, multiple auth options, MVC on generics, WebSockets, gRPC serving, view engines, sessions, localization, and rich response formats including streaming and server-sent events.
Learning material includes a getting-started tutorial, many runnable examples, a free online and downloadable book, and optional AI assistants that understand Iris APIs. In-memory HTTP testing runs the full router without opening ports.
Key features
- Typed path parameters and route macros
- Compile-checked NewBuilder application chain
- Central error map and thin handlers
- Dependency injection container
- Broad built-in middleware set
- JWT, API keys, and identity patterns
- WebSockets, gRPC, and API versioning
- In-memory httptest without network
Use cases
- Production REST APIs in Go
- MVC-style web applications
- Services needing structured error responses
- Apps with auth, sessions, and rate limits
- Streaming and AI-backed HTTP endpoints