R
R
Roman Rakzin2016-03-26 13:52:02
go
Roman Rakzin, 2016-03-26 13:52:02

Which Golang template engine to choose and how to include files dynamically?

I'm using the standard Go template engine.
There are 2 questions
1. You need to run the function specified in the template itself
2. You need to connect the file specified in the template
Well, something like this

<html>
    {{ GetFile "/js/myfile.js" }}
    {{ SayHello }}  //а функция возратит текст
    </html>

How to implement this?
I read the docks, but I can’t dynamically connect files - only there are examples in the go code, and there’s something with the functions of dancing with tambourines.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question