Optimized router
Radix-tree router; matching a route allocates no memory with default settings. Static paths match before parameters, parameters before wildcards.
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/v5Building a multi-tenant API? Echo Pro adds API keys, tenant isolation, quotas and signed webhooks.
e := echo.New()
// Middlewaree.Use(middleware.RequestLogger())e.Use(middleware.Recover())
// Route => handlere.GET("/", func(c *echo.Context) error { return c.String(http.StatusOK, "Hello, World!\n")})middleware package. JWT, sessions and metrics are official add-ons.c.Bind. The binding guide covers query parameters.StartConfig.StartTLS serves HTTPS from certificate files, or set StartConfig.TLSConfig and call Start. HTTP/2 works over TLS by default.echo.TemplateRenderer for html/template, or set e.Renderer to any engine that implements echo.Renderer.Create a module and add Echo.
go mod init myappgo get github.com/labstack/echo/v5Create 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")})Fetch dependencies and start serving on port 1323.
go mod tidygo run server.goProduction building blocks for teams running multi-tenant APIs on Echo v5.
High performance, extensible, minimalist Go web framework.