S
S
Salim_Gareev2018-08-28 22:34:51
go
Salim_Gareev, 2018-08-28 22:34:51

Insert pattern into go pattern by variable?

Good day.
I understood how to insert a template into a template using a constant {{template "content"}},
but I can't understand how to insert a variable using {{template .content}}.
I tried to create a function and print text, but all curly braces are escaped. Is there a way to disable shielding? Or what to do in this situation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ambrosian, 2018-08-28
@Ambrosian

Use string-compatible template.HTML as variable type.
For example:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question