How to pass value in nested template if possible?
Template package has terse documentation and not much examples.
In brief I want to
if err := template.Must(template.New("").Parse(`{{ define "inner"
}}{{ . }}{{end}}{{ define "outer" }}{{ template
"inner"}}{{end}}`)).ExecuteTemplate(os.Stdout, "outer", "foo"); err != nil {
print(err)
}
which write
<no value>
instead of desired "foo". Error isn't spawned. Am I missing something?
Cheers.
__
Ilya
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.