This is an automated email from the ASF dual-hosted git repository.

sgoeschl pushed a commit to branch FREEMARKER-195
in repository https://gitbox.apache.org/repos/asf/freemarker-generator.git


The following commit(s) were added to refs/heads/FREEMARKER-195 by this push:
     new b63f5a2  FREEMARKER-195 [freemarker-generator] Cleanup code and 
examples
b63f5a2 is described below

commit b63f5a248cb6810c304d0b3ad9afff75a388d2cf
Author: Siegfried Goeschl <[email protected]>
AuthorDate: Tue Oct 5 09:26:51 2021 +0200

    FREEMARKER-195 [freemarker-generator] Cleanup code and examples
---
 .../src/app/examples/templates/datasources.ftl                   | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/freemarker-generator-cli/src/app/examples/templates/datasources.ftl 
b/freemarker-generator-cli/src/app/examples/templates/datasources.ftl
index 440ea61..866ba3a 100644
--- a/freemarker-generator-cli/src/app/examples/templates/datasources.ftl
+++ b/freemarker-generator-cli/src/app/examples/templates/datasources.ftl
@@ -61,6 +61,14 @@ Iterate Over DataSources Using Hash Map Keys
 No data sources provided ...
 </#list>
 
+Iterate Over DataSources Using Lambda Expression
+==============================================================================
+<#list dataSources?filter(ds -> ds.match("group", "default")) as dataSource>
+- Group "default" => ${dataSource.name}
+<#else>
+No data sources provided ...
+</#list>
+
 Iterate Over DataSources Using Wildcard Search
 ==============================================================================
 <#list dataSources?api.find("*") as dataSource>
@@ -77,6 +85,7 @@ DataSources.find("*"): ${dataSources?api.find("*")?size}
 DataSources.find("uri", "*.md"): ${dataSources?api.find("uri", "*.md")?size}
 DataSources.find("extension", "md"): ${dataSources?api.find("extension", 
"md")?size}
 
+
 <#if dataSources?has_content>
 <#list dataSources as dataSource>
 [#${dataSource?counter}] - ${dataSource.name}

Reply via email to