package main
import (
"fmt"
"text/template"
)
func main() {
t, _ := template.New("base").Parse(`{{define "foo"}}foo{{end}}`)
fmt.Println(t.Lookup("base"))
fmt.Println(t.Lookup("foo"))
t.New("bar")
fmt.Println(t.Lookup("bar"))
}
returns
&{base 0x208304000 0x20829c400 }
&{foo 0x2083040e0 0x20829c400 }
<nil>
on commit 5b66e5d
Last line of output should not be <nil>