When I define a template like {{define “home”}}{{end}} and use it inside my html file like {{template “home”}} it works fine. But When I do the same thing but using the template as a variable it shows the panic. For example, from go code I am sending a variable “mytmpl”: “home” and using it inside {{template .mytmpl}} and the “home” is also defined. But getting the panic.
Because it needs to be a literal string statically known at compiletime (the templates compiletime). At least thats how I would read the documentation, as every example uses literal strings.