Skip to content

Guide

FAQ

Answers to common questions about Zinc, including how it compares, stability, performance, and compatibility.

A web framework for Go that sits on top of net/http. It adds fast routing, request binding, central error handling, response helpers, and 29 first-party middleware. It does not replace the standard HTTP server, request, or response writer.

How does it compare with Gin, Echo, and Chi?

Section titled “How does it compare with Gin, Echo, and Chi?”
Zinc Gin, Echo Chi
Handler signature func(*zinc.Context) error Custom context Standard http.HandlerFunc
Route syntax Go 1.22 braces: /users/{id} Colons: /users/:id Braces
An http.Handler? Yes Yes Yes
Standard handlers on routes Yes, with r.PathValue Through adapters Yes
Binding, responses, middleware Built in Built in Bring your own

Zinc sits between the two styles: the ergonomics of Gin and Echo, with Chi’s commitment to the standard library. If you like net/http but are tired of writing the same decoding, error, and response code in every handler, Zinc is aimed at you.

Zinc is pre-1.0. Its behavior is covered by tests, and the security-relevant middleware is documented with its limits. The public API can still change between minor versions. Pin a version, and read the release notes before upgrading.

Returning an error lets one error handler decide how every failure looks to clients, instead of each handler writing its own error response. Handlers stay short, and error responses stay consistent.

Yes. Standard handlers can serve routes through HandleHTTP or own subtrees through Mount. Standard middleware wraps the app through UseHTTP. The app itself is an http.Handler. See Zinc and net/http and Adopt Zinc in net/http.

In the latest comparison, Zinc had the lowest median latency in 60 of 77 scenarios against Gin, Echo, and Chi. Zinc was measured on 25 September 2026; the rival samples are from the previous day. Common string-response routes use 16 B and one allocation per request after response-header hardening. See Benchmarks for the full measurements, losses, and reproduction steps.

Zinc calls any validator you configure after every bind, but does not ship one. A three-line adapter plugs in go-playground/validator or any other library.

Does it support WebSockets, SSE, and HTTP/2?

Section titled “Does it support WebSockets, SSE, and HTTP/2?”

Yes. WebSocket libraries work unchanged because handlers get the real response writer (recipe). c.SSE writes server-sent events (recipe). HTTP/2 comes from Go’s server over TLS (recipe).

Route patterns are written in source code, so a typo is a programming error. Panicking at startup surfaces it immediately instead of at the first request. When patterns come from configuration, use TryHandle, which returns an error.

Open an issue on GitHub. Read CONTRIBUTING.md before opening a pull request.