From 0142ab53f0275eedd8acec2902b1fc6dff5b5f55 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Fri, 30 Oct 2026 07:41:21 -0700 Subject: [PATCH 1/3] docs: polish the README with GitHub Markdown features Add a centered header with the Echo logo for light and dark themes, the tagline, badges and a link row including Echo Pro and commercial support. Rename the intro to About and add a Mermaid diagram of the request flow. Use alerts for the v4 maintenance note and vulnerability reporting, show the example's output, and fold the third-party middleware list into a collapsed section. --- .github/assets/echo-logo-dark.svg | 1 + .github/assets/echo-logo-light.svg | 1 + README.md | 92 +++++++++++++++++++++++------- 3 files changed, 72 insertions(+), 22 deletions(-) create mode 100644 .github/assets/echo-logo-dark.svg create mode 100644 .github/assets/echo-logo-light.svg diff --git a/.github/assets/echo-logo-dark.svg b/.github/assets/echo-logo-dark.svg new file mode 100644 index 000000000..f1c09baaf --- /dev/null +++ b/.github/assets/echo-logo-dark.svg @@ -0,0 +1 @@ + diff --git a/.github/assets/echo-logo-light.svg b/.github/assets/echo-logo-light.svg new file mode 100644 index 000000000..429e0363d --- /dev/null +++ b/.github/assets/echo-logo-light.svg @@ -0,0 +1 @@ + diff --git a/README.md b/README.md index 5756d8481..a16aab6b3 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,56 @@ -[![Latest release](https://img.shields.io/github/v/release/labstack/echo?style=flat-square&label=release&color=00afd1)](https://github.com/labstack/echo/releases) -[![Last commit](https://img.shields.io/github/last-commit/labstack/echo/master?style=flat-square)](https://github.com/labstack/echo/commits/master) -[![Go Reference](https://pkg.go.dev/badge/github.com/labstack/echo/v5.svg)](https://pkg.go.dev/github.com/labstack/echo/v5) -[![CI](https://img.shields.io/github/actions/workflow/status/labstack/echo/ci.yml?style=flat-square&label=ci)](https://github.com/labstack/echo/actions/workflows/ci.yml) -[![Codecov](https://img.shields.io/codecov/c/github/labstack/echo.svg?style=flat-square)](https://codecov.io/gh/labstack/echo) -[![OpenSSF Scorecard](https://img.shields.io/ossf-scorecard/github.com/labstack/echo?style=flat-square&label=openssf%20scorecard)](https://scorecard.dev/viewer/?uri=github.com/labstack/echo) -[![Sponsors](https://img.shields.io/github/sponsors/labstack?style=flat-square&color=db61a2)](https://github.com/sponsors/labstack) -[![Discussions](https://img.shields.io/badge/community-discussions-00afd1.svg?style=flat-square)](https://github.com/labstack/echo/discussions) -[![X](https://img.shields.io/badge/x-@labstack-000000.svg?style=flat-square)](https://x.com/labstack) -[![License](https://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://github.com/labstack/echo/blob/master/LICENSE) - -## Echo - -High performance, extensible, minimalist Go web framework. +

+ + + + Echo + + +

+ +

High performance, extensible, minimalist Go web framework.

+ +

+ Latest release + Last commit + Go Reference + CI + Codecov + OpenSSF Scorecard + Sponsors + Discussions + X + License +

+ +

+ Website · + Quick start · + Middleware · + API reference · + Discussions · + Echo Pro · + Commercial support +

+ +## About Echo is built on Go's standard `net/http` and interoperates with it through `echo.WrapHandler` and `echo.WrapMiddleware`. It adds the parts the standard library leaves to you: a fast radix-tree router, request binding with pluggable validation, official and third-party middleware, and centralized error handling. Echo is actively maintained, and `v5` is the current release line. -- [Website](https://echo.labstack.com) -- [Quick start](https://echo.labstack.com/guide/quickstart/) -- [Middleware](https://echo.labstack.com/middleware/) -- [API reference](https://pkg.go.dev/github.com/labstack/echo/v5) -- [Echo Pro](https://echo.labstack.com/pro): commercial add-on packages for multi-tenant APIs -- Community help: [GitHub Discussions](https://github.com/labstack/echo/discussions) -- Commercial support: [Echo Support](https://echo.labstack.com/pro#support) +### How a request flows + +```mermaid +flowchart LR + req([HTTP request]) --> pre[Pre middleware] + pre --> router[Router] + router --> mw[Global, group and route middleware] + mw --> handler[Handler] + handler --> res([Response]) + mw -. error .-> eh[HTTPErrorHandler] + handler -. error .-> eh + eh --> res +``` + +`e.Pre` middleware runs before routing, so it can rewrite the path or method. Everything registered with `e.Use`, a group or a route runs after the router has matched. Any error returned by middleware or the handler goes to one `HTTPErrorHandler`. ### Features @@ -78,6 +107,9 @@ Echo is independent and community funded. If your company depends on Echo, pleas - `v5` is the current major version, released on 2026-01-18. See [API_CHANGES_V5.md](./API_CHANGES_V5.md) for the API changes from `v4` and upgrade notes. - `v4` receives bug fixes until 2026-12-31 and security fixes until 2027-12-31, on its latest release. See [SECURITY.md](./SECURITY.md). +> [!NOTE] +> Echo v4 is in maintenance and gets no new features. Start new projects on v5, and plan v4 upgrades with [API_CHANGES_V5.md](./API_CHANGES_V5.md). + See [ROADMAP.md](./ROADMAP.md) for where Echo is heading and the version support policy. ### Installation @@ -119,6 +151,16 @@ func hello(c *echo.Context) error { } ``` +Run it and send a request: + +```console +$ go run . +$ curl http://localhost:8080/ +Hello, World! +``` + +`e.Start` shuts the server down gracefully on Ctrl+C. + More in the [guide](https://echo.labstack.com/guide/quickstart/) and the [cookbook](https://echo.labstack.com/cookbook/hello-world/). ## Middleware @@ -136,6 +178,9 @@ Maintained by the Echo team. ### Third-party +
+Third-party middleware list + These projects are maintained by their authors, not the Echo team. Review them before use, and check which Echo version (`v4` or `v5`) each supports. | Repository | Description | @@ -149,6 +194,8 @@ These projects are maintained by their authors, not the Echo team. Review them b | [mikestefanello/pagoda](https://github.com/mikestefanello/pagoda) | Full-stack web development starter kit built on Echo | | [go-woo/protoc-gen-echo](https://github.com/go-woo/protoc-gen-echo) | Generates Echo server code from Protocol Buffers | +
+ To add your library, send a pull request. ## Contributing @@ -159,7 +206,8 @@ To add your library, send a pull request. ## Security -Report vulnerabilities privately through [GitHub Security Advisories](https://github.com/labstack/echo/security/advisories/new), not in public issues. See [SECURITY.md](./SECURITY.md) for supported versions. +> [!IMPORTANT] +> Report vulnerabilities privately through [GitHub Security Advisories](https://github.com/labstack/echo/security/advisories/new), not in public issues. See [SECURITY.md](./SECURITY.md) for supported versions. ## Credits From 099048abce335543b0b7bf01de6221a647f87513 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Fri, 30 Oct 2026 07:43:00 -0700 Subject: [PATCH 2/3] docs: show Pre middleware errors in the request-flow diagram --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a16aab6b3..1f33f3681 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,8 @@ flowchart LR router --> mw[Global, group and route middleware] mw --> handler[Handler] handler --> res([Response]) - mw -. error .-> eh[HTTPErrorHandler] + pre -. error .-> eh[HTTPErrorHandler] + mw -. error .-> eh handler -. error .-> eh eh --> res ``` From cc3fd8526cb25cec9dc1ade1add0521373d4a067 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Fri, 30 Oct 2026 07:59:13 -0700 Subject: [PATCH 3/3] docs: keep the README readable on pkg.go.dev pkg.go.dev shows GitHub alerts as literal [!NOTE] text and does not render Mermaid. Use bold notes and a numbered request-flow list instead, and load the logos from absolute URLs so they show outside GitHub. --- README.md | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 1f33f3681..ccae41371 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@

- - Echo + + Echo

@@ -38,20 +38,11 @@ Echo is built on Go's standard `net/http` and interoperates with it through `ech ### How a request flows -```mermaid -flowchart LR - req([HTTP request]) --> pre[Pre middleware] - pre --> router[Router] - router --> mw[Global, group and route middleware] - mw --> handler[Handler] - handler --> res([Response]) - pre -. error .-> eh[HTTPErrorHandler] - mw -. error .-> eh - handler -. error .-> eh - eh --> res -``` - -`e.Pre` middleware runs before routing, so it can rewrite the path or method. Everything registered with `e.Use`, a group or a route runs after the router has matched. Any error returned by middleware or the handler goes to one `HTTPErrorHandler`. +1. **Pre middleware** (`e.Pre`) runs before routing, so it can rewrite the path or method. +2. The **router** matches the route. +3. **Middleware** registered with `e.Use`, a group or a route runs. +4. The **handler** writes the response. +5. Any error returned by middleware or the handler goes to one `HTTPErrorHandler`. ### Features @@ -108,8 +99,7 @@ Echo is independent and community funded. If your company depends on Echo, pleas - `v5` is the current major version, released on 2026-01-18. See [API_CHANGES_V5.md](./API_CHANGES_V5.md) for the API changes from `v4` and upgrade notes. - `v4` receives bug fixes until 2026-12-31 and security fixes until 2027-12-31, on its latest release. See [SECURITY.md](./SECURITY.md). -> [!NOTE] -> Echo v4 is in maintenance and gets no new features. Start new projects on v5, and plan v4 upgrades with [API_CHANGES_V5.md](./API_CHANGES_V5.md). +> **Note:** Echo v4 is in maintenance and gets no new features. Start new projects on v5, and plan v4 upgrades with [API_CHANGES_V5.md](./API_CHANGES_V5.md). See [ROADMAP.md](./ROADMAP.md) for where Echo is heading and the version support policy. @@ -207,8 +197,7 @@ To add your library, send a pull request. ## Security -> [!IMPORTANT] -> Report vulnerabilities privately through [GitHub Security Advisories](https://github.com/labstack/echo/security/advisories/new), not in public issues. See [SECURITY.md](./SECURITY.md) for supported versions. +> **Important:** Report vulnerabilities privately through [GitHub Security Advisories](https://github.com/labstack/echo/security/advisories/new), not in public issues. See [SECURITY.md](./SECURITY.md) for supported versions. ## Credits