In Go we can create a variable easily enough with
{{- if .Bool.Var -}}
{{ $MyVar := "val" }}
{{- end -}}
We can even create shared snippets easily enough
{{- define "val" -}}
<p>Some shared template data</p>
{{- end -}}
My question is, how do we go about using $MyVar
as a text value for {{template}}
so that we can do something like {{template $MyVar}}
, without causing an error, or is this not possible?