| commit | 49bbb6b64a51d9753f3af36d3a890d56942b9faa | [log] [tgz] |
|---|---|---|
| author | Johnnie Kearse III <jkearse3@gmail.com> | Sat Feb 06 07:44:11 2016 -0500 |
| committer | Johnnie Kearse III <jkearse3@gmail.com> | Sat Feb 06 07:44:11 2016 -0500 |
| tree | c8d24f4f5287bbd2287d6f481edf78f181addf31 | |
| parent | 82db91fe6d1db4c070fed544cb5d0b5cc08fe276 [diff] |
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.