Select the desired injection language into any go template. I made this plugin for use with chezmoi but it can be used for any go template.
Add the comment {{- /*lang:{injection.language}*/ -}} at the top of the
template replacing injection.language. This comment may be preceded by any text
but it must be the first go template action in the template.
Example in an index.html file:
{{- /*lang:html*/ -}}
<html>
<head>
<title>{{.mytitle}}</title>
</head>
</html>
<!-- You can use vim modelines for files without the .tmpl extension -->
<!-- vim: ft=gotmpl -->This plugin just has two things: