FAQ
a.tpl :
{{define "a"}}
   {{template "b"}}
{{end}}

b.tpl:
{{define "b"}}
{{end}}

when executetemplate("a"), throw: "not find "b" template.

If removing {{define "a"}} from a.tpl, executemplate(a.tpl) that's OK!

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Rodrigo Kochenburger at Sep 24, 2013 at 5:01 pm
    you need to parse all the files, a and b before executing the template.

    - RK

    On Tue, Sep 24, 2013 at 2:26 AM, wrote:

    a.tpl :
    {{define "a"}}
    {{template "b"}}
    {{end}}

    b.tpl:
    {{define "b"}}
    {{end}}

    when executetemplate("a"), throw: "not find "b" template.

    If removing {{define "a"}} from a.tpl, executemplate(a.tpl) that's OK!

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 24, '13 at 3:09p
activeSep 24, '13 at 5:01p
posts2
users2
websitegolang.org

2 users in discussion

Rodrigo Kochenburger: 1 post Ssm Fox: 1 post

People

Translate

site design / logo © 2022 Grokbase