I do not see a way to call templates (text or html) with a dynamic name. Example:
This works:
{{template "Blah" .}}
This errors with "unexpected "$BlahVar" in template invocation":
{{$BlahVar := "Blah"}}
{{template $BlahVar .}}
The overall problem I'm trying to solve is that I need to render templates conditionally based on a configuration file - so I don't know the names of the templates ahead of time. Obviously I can put a function in the FuncMap which just does a separate template parsing and invocation and returns that result but was wondering if there is a Better Way.