summaryrefslogtreecommitdiffstats
path: root/tpl/cast/cast.go
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/cast/cast.go')
-rw-r--r--tpl/cast/cast.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/tpl/cast/cast.go b/tpl/cast/cast.go
index d2dfd745f..495e5a14f 100644
--- a/tpl/cast/cast.go
+++ b/tpl/cast/cast.go
@@ -26,10 +26,12 @@ func New() *Namespace {
type Namespace struct {
}
+// ToInt converts the given value to an int.
func (ns *Namespace) ToInt(v interface{}) (int, error) {
return _cast.ToIntE(v)
}
+// ToString converts the given value to a string.
func (ns *Namespace) ToString(v interface{}) (string, error) {
return _cast.ToStringE(v)
}