GeezerVison is showing echo.labstack.com — Echo
New: Echo Pro — multi-tenant auth, quotas and signed webhooks for Echo v5. Founding pricing for the first 25 organisations. See Echo Pro Build fast Go APIs. Without the bloat. A high-performance, minimalist Go web framework with a zero-allocation router, batteries-included middleware and an expressive API.
go get github.com/labstack/echo/v5
Building a multi-tenant API? Echo Pro adds API keys, tenant isolation, quotas and signed webhooks.
server.go · excerpt e. Use (middleware. RequestLogger ())
e. Use (middleware. Recover ())
e. GET ( "/" , func ( c * echo . Context ) error {
return c. String (http.StatusOK, "Hello, World! \n " )
~/echo $ curl localhost:1323
HTTP/1.1 200 OK
Hello, World!
~/echo $
32.8k GitHub stars
0 allocs router, per request
25+ built-in middlewares
MIT open source license
Features
Optimized router Radix-tree router; matching a route allocates no memory with default settings. Static paths match before parameters, parameters before wildcards.
Middleware CORS, CSRF, rate limiting, gzip, recover and request logging ship in Echo’s middleware package. JWT, sessions and metrics are official add-ons.
Data binding Bind JSON, XML or form bodies and path parameters into a struct with one call to
c.Bind. The
binding guide covers query parameters.
TLS and HTTP/2 StartConfig.StartTLS serves HTTPS from certificate files, or set StartConfig.TLSConfig and call Start. HTTP/2 works over TLS by default.
Extensible Write middleware as a plain function. Replace the binder, validator, renderer, IP extractor or error handler.
Templates Use echo.TemplateRenderer for html/template, or set e.Renderer to any engine that implements echo.Renderer.
Quickstart
Install Create a module and add Echo.
go get github.com/labstack/echo/v5
Write Create server.go with one route. The full example adds imports and main.
e. GET ( "/" , func ( c * echo . Context ) error {
return c. String (http.StatusOK, "Hello, World! \n " )
Run Fetch dependencies and start serving on port 1323.
Official packages
echo-jwt JWT authentication middleware backed by golang-jwt. echo-otel OpenTelemetry tracing and metrics middleware.
Sponsors
Echo stays MIT. Echo Pro is a separate commercial library that funds it. Production building blocks for teams running multi-tenant APIs on Echo v5.
Site links echo High performance, extensible, minimalist Go web framework.