Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 13, 15:30 UTC
templates: cap of slice should not be smaller than length (#4975)
jedy committed
Aug 23, 2022 at 22:26 UTC
e289ba6187ddd50afc86feb85246a14298673a69
1 file changed
+1
-1
modules/caddyhttp/templates/templates.go
+1
-1
@@ -296,7 +296,7 @@ func (Templates) CaddyModule() caddy.ModuleInfo {
296
// Provision provisions t.
297
func (t *Templates) Provision(ctx caddy.Context) error {
298
fnModInfos := caddy.GetModules("http.handlers.templates.functions")
299
- customFuncs := make([]template.FuncMap, len(fnModInfos), 0)
299
+ customFuncs := make([]template.FuncMap, 0, len(fnModInfos))
300
for _, modInfo := range fnModInfos {
301
mod := modInfo.New()
302
fnMod, ok := mod.(CustomFunctions)