mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-22 16:46:53 +01: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.
|
// Provision provisions t.
|
||||||
func (t *Templates) Provision(ctx caddy.Context) error {
|
func (t *Templates) Provision(ctx caddy.Context) error {
|
||||||
fnModInfos := caddy.GetModules("http.handlers.templates.functions")
|
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 {
|
for _, modInfo := range fnModInfos {
|
||||||
mod := modInfo.New()
|
mod := modInfo.New()
|
||||||
fnMod, ok := mod.(CustomFunctions)
|
fnMod, ok := mod.(CustomFunctions)
|
||||||
|
|
Loading…
Reference in a new issue