Skip to content

Commit

Permalink
update whtmpl collection funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
jtolio committed May 30, 2017
1 parent 4729605 commit 3f30213
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions whtmpl/tmpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ func makemap(vals ...interface{}) map[interface{}]interface{} {
return rv
}

// Allows you to add and overwrite template function definitions.
func (tc *Collection) Funcs(m template.FuncMap) {
// Allows you to add and overwrite template function definitions. Mutates
// called collection and returns self.
func (tc *Collection) Funcs(m template.FuncMap) *Collection {
tc.group = tc.group.Funcs(m)
return tc
}

// MustParse parses template source "tmpl" and stores it in the
Expand Down

0 comments on commit 3f30213

Please sign in to comment.