From 4400ae8080eb726a1365c9f41294193bbc775638 Mon Sep 17 00:00:00 2001 From: arturoeanton Date: Mon, 24 Jan 2022 23:57:38 -0300 Subject: [PATCH] add ResetTrees in gin.go --- gin.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gin.go b/gin.go index 9bd4c46a..6cfdc0a4 100644 --- a/gin.go +++ b/gin.go @@ -213,6 +213,10 @@ func (engine *Engine) allocateContext() *Context { return &Context{engine: engine, params: &v, skippedNodes: &skippedNodes} } +func (e *Engine) ResetTrees() { + e.trees = make(methodTrees, 0, 9) +} + // Delims sets template left and right delims and returns an Engine instance. func (engine *Engine) Delims(left, right string) *Engine { engine.delims = render.Delims{Left: left, Right: right}