Merge pull request #22 from jkearse3/master
refactored New.
diff --git a/chain.go b/chain.go
index d281ad3..8adf0c0 100644
--- a/chain.go
+++ b/chain.go
@@ -21,10 +21,7 @@
// New serves no other function,
// constructors are only called upon a call to Then().
func New(constructors ...Constructor) Chain {
- c := Chain{}
- c.constructors = append(c.constructors, constructors...)
-
- return c
+ return Chain{append(([]Constructor)(nil), constructors...)}
}
// Then chains the middleware and returns the final http.Handler.