Skip to content
Vanilla Golang middleware library for all http.Handler
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
db/gormcontext added gormcontext Aug 8, 2017
funconv added funconv.Wrap Aug 10, 2017
logcontext logcontext: added error log and complex logger Aug 23, 2017
.travis.yml travis: remove go test below 1.9 Oct 23, 2018 update Aug 17, 2017
middleware_test.go basic Middleware definition and Chain Jul 6, 2017
mware_requestid.go added HandleRequestID middleware Jul 6, 2017
mware_requestid_test.go remove obsoleted varaible from test Jun 26, 2018

Midway Documentations Travis CI results

A simple middleware collection to work with http.Handler implementations, and maybe go-kit.

Inspired by go-kit's middleware chaining.

Basic Design

Like other similar efforts that inspired by go1.7 release and the changes in net/http and context, this is a collection of opiniated middlewares that fulfill this signature:

type Middleware func(http.Handler) http.Handler

Along with some utils to chain middleware and to rewrite functions, this collection of middleware passes variables into http.Request.Context, or rewrites request for inner http.Handler implmentations, or both.

The current collection includes:

Similar and Interoperable Projects

You can’t perform that action at this time.