diff options
Diffstat (limited to 'tpl/strings/truncate.go')
-rw-r--r-- | tpl/strings/truncate.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tpl/strings/truncate.go b/tpl/strings/truncate.go index 923816e9f..6e3a50ed2 100644 --- a/tpl/strings/truncate.go +++ b/tpl/strings/truncate.go @@ -39,6 +39,7 @@ type htmlTag struct { openTag bool } +// Truncate truncates a given string to the specified length. func (ns *Namespace) Truncate(a interface{}, options ...interface{}) (template.HTML, error) { length, err := cast.ToIntE(a) if err != nil { |