Moved the handlers from stack into modules

This commit is contained in:
Ethan Frey
2017-07-06 16:00:54 +02:00
parent 768427dcc0
commit a047e210fa
18 changed files with 104 additions and 72 deletions
-14
View File
@@ -60,20 +60,6 @@ func New(middlewares ...Middleware) *Stack {
}
}
// NewDefault sets up the common middlewares before your custom stack.
//
// This is logger, recovery, signature, and chain
func NewDefault(middlewares ...Middleware) *Stack {
mids := []Middleware{
Logger{},
Recovery{},
Signatures{},
Chain{},
}
mids = append(mids, middlewares...)
return New(mids...)
}
// Use sets the final handler for the stack and prepares it for use
func (s *Stack) Use(handler basecoin.Handler) *Stack {
if handler == nil {