summaryrefslogtreecommitdiffstats
path: root/tpl/cast
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-04-30 18:12:08 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-06 19:43:22 +0200
commit6eea32bd6bc8e7a7dd07a8cb6a8343ae2c74aba0 (patch)
treedc9b14069f5e983942ac53c6f5e6d8629a5c269e /tpl/cast
parenta6d545854a670356e93cd48e55de6e81233d68cb (diff)
tpl: Improve godoc
Diffstat (limited to 'tpl/cast')
-rw-r--r--tpl/cast/cast.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tpl/cast/cast.go b/tpl/cast/cast.go
index 000e315f1..535697f9e 100644
--- a/tpl/cast/cast.go
+++ b/tpl/cast/cast.go
@@ -29,18 +29,18 @@ func New() *Namespace {
type Namespace struct {
}
-// ToInt converts the given value to an int.
+// ToInt converts v to an int.
func (ns *Namespace) ToInt(v any) (int, error) {
v = convertTemplateToString(v)
return _cast.ToIntE(v)
}
-// ToString converts the given value to a string.
+// ToString converts v to a string.
func (ns *Namespace) ToString(v any) (string, error) {
return _cast.ToStringE(v)
}
-// ToFloat converts the given value to a float.
+// ToFloat converts v to a float.
func (ns *Namespace) ToFloat(v any) (float64, error) {
v = convertTemplateToString(v)
return _cast.ToFloat64E(v)