tpl: Add some GoDoc info to template func docs

Closes #3418
This commit is contained in:
Bjørn Erik Pedersen
2017-05-02 11:03:08 +02:00
parent f9e41f6497
commit cff2f31334
4 changed files with 1448 additions and 1122 deletions

View File

@@ -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)
}

View File

@@ -25,7 +25,7 @@ func init() {
docs := make(map[string]interface{})
d := &deps.Deps{}
var namespaces []*internal.TemplateFuncsNamespace
var namespaces internal.TemplateFuncsNamespaces
for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
nf := nsf(d)