From: bep Date: Tue, 20 Jan 2015 12:31:02 +0000 (+0100) Subject: Add inline doc for Apply X-Git-Tag: v0.13~152 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3f0f186b91e89f8958821d25820a7a73d29fb4be;p=brevno-suite%2Fhugo Add inline doc for Apply --- diff --git a/tpl/template.go b/tpl/template.go index 84a3fd14..97b2e5bb 100644 --- a/tpl/template.go +++ b/tpl/template.go @@ -544,6 +544,7 @@ func Where(seq, key interface{}, args ...interface{}) (r interface{}, err error) } } +// Apply, given a map, array, or slice, returns a new slice with the function fname applied over it. func Apply(seq interface{}, fname string, args ...interface{}) (interface{}, error) { if seq == nil { return make([]interface{}, 0), nil