Ty, The block template can satisfy your need: https://godoc.org/text/template#example-Template--Block
On Wednesday, May 17, 2017 at 4:55:28 AM UTC-7, Tieson Molly wrote: > > Is there a way to defined a template name as a fallback if one does not > exist? > > Say you have a nested template in your code > > {{template "javascript" .}} > > > if the template name "javascript" is not defined because you did not > include that file during the parsing, is there a way to > > generate that name dynamically? > > Best regards, > > Ty > -- 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.