mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 10:11:03 +00:00
Merge pull request #1574 from weaveworks/middleware-identity
Add Indentity middleware
This commit is contained in:
@@ -18,6 +18,9 @@ func (m Func) Wrap(next http.Handler) http.Handler {
|
||||
return m(next)
|
||||
}
|
||||
|
||||
// Identity is an Interface which doesn't do anything.
|
||||
var Identity Interface = Func(func(h http.Handler) http.Handler { return h })
|
||||
|
||||
// Merge produces a middleware that applies multiple middlesware in turn;
|
||||
// ie Merge(f,g,h).Wrap(handler) == f.Wrap(g.Wrap(h.Wrap(handler)))
|
||||
func Merge(middlesware ...Interface) Interface {
|
||||
|
||||
Reference in New Issue
Block a user