pub fn render(template: &str, vars: &TemplateVars) -> Result<String>Expand description
Render a template string with the given variables.
Supports both Go-style ({{ .Field }}) and native Tera-style ({{ Field }}).
Go-style references are preprocessed into Tera-style before rendering.
Because this uses Tera under the hood, all Tera features are available:
conditionals ({% if %} / {% else %} / {% endif %}), loops ({% for %}),
filters (| lower, | upper, | default, | trim, | title, | replace, etc.).
Custom GoReleaser-compat filters are registered:
tolower/toupper— aliases for Tera’s built-inlower/uppertrimprefix(prefix="v")— strip a prefix from a stringtrimsuffix(suffix=".exe")— strip a suffix from a string