add ResetTrees in gin.go

This commit is contained in:
arturoeanton 2022-01-24 23:57:38 -03:00
parent 580e7da6ee
commit 4400ae8080
1 changed files with 4 additions and 0 deletions

4
gin.go
View File

@ -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}