Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

17ColinMiPerry/daisy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Daisy

Daisy is a lightweight + zero dependency middleware chainer for net/http Syntax is meant to be extremely readable, following a first-in first-executed pattern

Installation

go get github.com/17ColinMiPerry/daisy

Why Daisy?

Vanilla Go uses nesting, which can become hard to read:

// hard to read. inside-out execution order
http.Handle("/", MiddlewareThree(MiddlewareTwo(MiddlewareOne(myHandler))))

Go + Daisy is readable and easy to use:

// easy to read. reads left-to-right
http.Handle("/", daisy.chain(MiddlewareOne, MiddlewareTwo, MiddlewareThree).To(myHandler))

About

A middleware chaining package for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages