tpl: Add docshelper for template funcs

And fix some other minor related issues.

Updates #3418
This commit is contained in:
Bjørn Erik Pedersen
2017-05-01 18:40:34 +02:00
parent e2b067f050
commit 690b0f8ff5
25 changed files with 2064 additions and 347 deletions

View File

@@ -26,14 +26,15 @@ func New() *Namespace {
type Namespace struct {
}
func (ns *Namespace) Print(a ...interface{}) (n int, err error) {
return _fmt.Print(a...)
func (ns *Namespace) Print(a ...interface{}) string {
return _fmt.Sprint(a...)
}
func (ns *Namespace) Printf(format string, a ...interface{}) (n int, err error) {
return _fmt.Printf(format, a...)
func (ns *Namespace) Printf(format string, a ...interface{}) string {
return _fmt.Sprintf(format, a...)
}
func (ns *Namespace) Println(a ...interface{}) (n int, err error) {
return _fmt.Println(a...)
func (ns *Namespace) Println(a ...interface{}) string {
return _fmt.Sprintln(a...)
}