模板和自定义功能; 错误:在<“ funcName”>执行“ templName”不是定义函数

I got some text that I´m adding with template.AddParseTree method in order to append the template text, but there is a weir behaviour, the method is supossed to use it like this:

singleTemplate=anyTemplate
targetTemplate=*template.Must(targetTemplate.AddParseTree(e.Name, anyTemplate.Tree))

But is not working when singleTemplate has a funtion, by a weird reason it only works when I do this

singleTemplate=anyTemplate
targetTemplate=*template.Must(singleTemplate.AddParseTree(e.Name, anyTemplate.Tree))

But it must not work that way, because I won´t be able to append anything else You can try it here: https://play.golang.org/p/f5oXNzD1fKP

package main

import (
    "log"
    "os"
    "text/template"
)

var funcionIncremento = template.FuncMap{
    "inc": func(i int) int {
        return i + 1
    },
}

func main() {

    var strs []string
    strs = append(strs, "test1")
    strs = append(strs, "test2")
    //-----------------Not valid(it would)
    var probar1 = template.Template{}
    var auxiliar1 = template.Template{}
    auxiliar1 = *template.Must(template.New("test").Funcs(funcionIncremento).Parse(`
            {{range $index, $element := .}}
                Number: {{inc $index}}
            {{end}}
    `))

    probar1 = *template.Must(probar1.AddParseTree("test", auxiliar1.Tree))
    err := probar1.ExecuteTemplate(os.Stdout, "test", &strs)
    if err != nil {
        log.Println("Error1: ", err)
    }
//--------------------------------valid(it wouldn´t), because I wouldn´t be able to append
    var probar2 = template.Template{}
    var auxiliar2 = template.Template{}
    auxiliar2 = *template.Must(template.New("test").Funcs(funcionIncremento).Parse(`
            {{range $index, $element := .}}
                Number: {{inc $index}}
            {{end}}
    `))

    probar2 = *template.Must(auxiliar2.AddParseTree("test", auxiliar2.Tree))
    err = probar2.ExecuteTemplate(os.Stdout, "test", &strs)
    if err != nil {
        log.Println("Error2: ", err)
    }
    //-------------------------------------------
}

a.AddParseTree("t", b.Tree) adds only the parse.Tree of template b it does not add b's functions because they are not part of the parse.Tree type, they are part of the template.Template type.

Any function that b needs to use, must also be added to a.

var probar1 = template.New("pro").Funcs(funcionIncremento)
var auxiliar1 = template.New("aux").Funcs(funcionIncremento)

auxiliar1 = template.Must(auxiliar1.Parse(`
        {{range $index, $element := .}}
            Number: {{inc $index}}
        {{end}}
`))

probar1 = template.Must(probar1.AddParseTree("test", auxiliar1.Tree))
err := probar1.ExecuteTemplate(os.Stdout, "test", &strs)
if err != nil {
    log.Println("Error1: ", err)
}