diff options
author | jedy <jedywu@gmail.com> | 2022-08-23 22:26:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 08:26:02 -0600 |
commit | e289ba6187ddd50afc86feb85246a14298673a69 (patch) | |
tree | d665de60c3d4e27769dd18db37bcafe2ce8fe06f /modules/caddyhttp | |
parent | a22c08a6385772861173f21ebab3ac0b63796402 (diff) |
templates: cap of slice should not be smaller than length (#4975)
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r-- | modules/caddyhttp/templates/templates.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/templates/templates.go b/modules/caddyhttp/templates/templates.go index 85612ba..40e5bbe 100644 --- a/modules/caddyhttp/templates/templates.go +++ b/modules/caddyhttp/templates/templates.go @@ -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) |