source: appstream-generator/contrib/subprojects/mustache-d-0.1.3/example/basic.d @ 4841

Last change on this file since 4841 was 4841, checked in by Juanma, 2 years ago

Initial release

File size: 370 bytes
Line 
1import mustache;
2import std.stdio;
3
4alias MustacheEngine!(string) Mustache;
5
6void main()
7{
8    Mustache mustache;
9    auto context = new Mustache.Context;
10
11    context["name"]  = "Chris";
12    context["value"] = 10000;
13    context["taxed_value"] = 10000 - (10000 * 0.4);
14    context.useSection("in_ca");
15
16    stdout.rawWrite(mustache.render("example/basic", context));
17}
Note: See TracBrowser for help on using the repository browser.