This commit is contained in:
Arturo Elias 2024-11-19 13:32:03 +00:00 committed by GitHub
commit f9ee3b1d2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

4
gin.go
View File

@ -245,6 +245,10 @@ func (engine *Engine) allocateContext(maxParams uint16) *Context {
return &Context{engine: engine, params: &v, skippedNodes: &skippedNodes} 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. // Delims sets template left and right delims and returns an Engine instance.
func (engine *Engine) Delims(left, right string) *Engine { func (engine *Engine) Delims(left, right string) *Engine {
engine.delims = render.Delims{Left: left, Right: right} engine.delims = render.Delims{Left: left, Right: right}