Merge pull request #13 from mmlb/patch-1
make the new slice the full length necessary
diff --git a/chain.go b/chain.go
index 9b04887..6ae8c26 100644
--- a/chain.go
+++ b/chain.go
@@ -85,9 +85,9 @@
// // requests in stdChain go m1 -> m2
// // requests in extChain go m1 -> m2 -> m3 -> m4
func (c Chain) Append(constructors ...Constructor) Chain {
- newCons := make([]Constructor, len(c.constructors))
+ newCons := make([]Constructor, len(c.constructors)+len(constructors))
copy(newCons, c.constructors)
- newCons = append(newCons, constructors...)
+ copy(newCons[len(c.constructors):], constructors)
newChain := New(newCons...)
return newChain