'Is there a way to convert handlebars syntax to the golang template language?

Is there a safe way to easily convert standard handlebars templating syntax to the templating syntax used in golang(e.g. {{.Lookup "Question"}})?

I have a Jenkins pipeline that runs some javascript code and would like to implement this functionality in the same pipeline without adding more(or at least as less as possible) dependancies to the pipeline.

Files come from a service as html templates containing handlebar syntax and I would like to parse them to golang templating language syntax and use them in another service running golang.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source