mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-26 21:53:48 +03:00
templates: cap of slice should not be smaller than length (#4975)
This commit is contained in:
parent
a22c08a638
commit
e289ba6187
1 changed files with 1 additions and 1 deletions
|
@ -296,7 +296,7 @@ func (Templates) CaddyModule() caddy.ModuleInfo {
|
|||
// Provision provisions t.
|
||||
func (t *Templates) Provision(ctx caddy.Context) error {
|
||||
fnModInfos := caddy.GetModules("http.handlers.templates.functions")
|
||||
customFuncs := make([]template.FuncMap, len(fnModInfos), 0)
|
||||
customFuncs := make([]template.FuncMap, 0, len(fnModInfos))
|
||||
for _, modInfo := range fnModInfos {
|
||||
mod := modInfo.New()
|
||||
fnMod, ok := mod.(CustomFunctions)
|
||||
|
|
Loading…
Reference in a new issue