github.com/carbocation/interpose
Interpose is a minimalist Golang middleware that uses only `http.Handler` and `func(http.Handler)http.Handler`. Interpose takes advantage of closures to create a stack of native net/http middleware. Unlike other middleware libraries which create their own net/http-like signatures, interpose uses literal net/http signatures, thus minimizing package lock-in and maximizing inter-compatibility. Middleware is called in nested FIFO fashion, which means that the first middleware to be added will be the first middleware to be called. Because the middleware is nested, it actually means that the first middleware to be added gets the opportunity to make the first and the last calls in the stack. For example, if there are 3 middlewares added in order (0, 1, 2), the calls look like so:
proxy.golang.org
v0.0.0-20161206215253-723534742ba3
over 9 years ago
2
10
31
v0.0.0-20150203151851-35a997f84ece
Published: about 11 years agoRegistry - Documentation - Download
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/carbocation/interpose
spec |
| License | MIT |
| Namespace | github.com/carbocation |
| First Release | about 11 years ago |
| Last Synced | 17 days ago |