Capture or assign golang template output to variable

后端 未结 1 452
醉话见心
醉话见心 2020-12-02 02:25

Within a template, how can I achieve this?

{{$var := template \"my-template\"}}

I just get \"unexpected