Skip to content

Latest commit

 

History

History
19 lines (10 loc) · 928 Bytes

readme.md

File metadata and controls

19 lines (10 loc) · 928 Bytes

Middle

Go HTTP middleware I like to use.

Usage

Checkout the examples directory for usage examples.

Compatibility

As this package only depends on net/http package APIs, it can be used in any framework or libraries that uses types exposed by net/http package, e.g., github.com/julienschmidt/httprouter.

Limitations

This package exposes middleware functions chain builders for up to 27 functions, i.e., Chain1 up to Chain27. Although I think this is way more than enough for most of applications, I plan to improve the generator so you can generate your middle.ChainN up to any number of N you need by using it. See generator for more.

Using Generator

See gen command line flags, and ./gen.go for an example of usage.