mustache
mustache copied to clipboard
The mustache template language in Go
In other implementations of mustache there is the ability to write a selector into an array by the index. Ex: `items.0.name`. This doesn't seem possible with the golang implementation. I...
Test: ``` func TestMustacheRenderPartials(t *testing.T) { expected := "header\n\n\tline 1\n\tline 2\n\nfooter\n" staticProvider := &mustache.StaticProvider{ Partials: map[string]string{ "body": strings.Join([]string{ "\tline 1", "\tline 2", }, "\n"), }, } actual, err := mustache.RenderPartials(...
Hi, I did the docker image for this repo. https://hub.docker.com/r/faan11/mustache-cli You can download it by using: `docker pull image faan11/mustache-cli` and then running by: `docker run -ti faan11/mustache-cli` It can...
I would be using this to generate JSON which causes problems with hanging commas. For example: **Template:** ``` { "user_name": {{email}} "update_ids": { {{#items}} {{item.id}}, {{/items}} } ``` **Input JSON:**...
This is a PoC which I may need for something I'm working on - I've been looking at a small number of actual values with a large number of variations,...
Is there a mode that will recursively resolve references in a template?
I'm trying to loop through the properties of an object. According to [stackoverflow](https://stackoverflow.com/a/17516837/1759796) this should be supported, but I get the error: ``` Error: line 5: interleaved closing tag: each...
I did it in https://github.com/jabley/mustache/commits/master if you wanted to steal.
Hello, I wanted to inquire about any existing policy/your preference for reporting any potential security vulnerability findings. Rather than just opening a public issue, I wanted to check whether there...
This PR adds a special interface `CustomLookup` that allows the caller of Render to manage the context lookup in its own methods. I included a small unit test that demonstrates...