tpl/collections: Fix description of apply function - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit dc2a544fac7a3f9cb8bff70d5cbe92b37dee98d1
DIR parent 916397320b56b74e84f466cbab3ca205d676e377
HTML Author: Joe Mooring <joe.mooring@veriphor.com>
Date: Thu, 20 Jul 2023 12:29:25 -0700
tpl/collections: Fix description of apply function
The collections.Apply template function cannot be used with maps.
Diffstat:
M tpl/collections/apply.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/tpl/collections/apply.go b/tpl/collections/apply.go
@@ -24,7 +24,7 @@ import (
"github.com/gohugoio/hugo/tpl"
)
-// Apply takes a map, array, or slice c and returns a new slice with the function fname applied over it.
+// Apply takes an array or slice c and returns a new slice with the function fname applied over it.
func (ns *Namespace) Apply(ctx context.Context, c any, fname string, args ...any) (any, error) {
if c == nil {
return make([]any, 0), nil