// copy duplicate the whole chain of contextMiddleware.
copy duplicate the whole chain of contextMiddleware.
// copy duplicate the whole chain of contextMiddleware .
func (chain *Chain) copy() (newChain *Chain) {
	newChain = NewChain(chain.middleware)
	if chain.parent != nil {
		newChain.parent = chain.parent.copy()
	}
	return
}
func ( chain * Chain ) copy ( ) ( newChain * Chain ) { newChain = NewChain ( chain . middleware ) if chain . parent != nil { newChain . parent = chain . parent . copy ( ) } return }
copy duplicate the whole chain of contextMiddleware.
copy duplicate the whole chain of contextMiddleware .