From 6661ef73b496e8ed08f41f5d3f58e47d74e4f2f0 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Thu, 13 Oct 2022 01:58:26 +0300 Subject: [PATCH] Add java load aliases for the unaware --- TODO.md | 1 + source/mirage/java.d | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 94e1a64..70b2017 100644 --- a/TODO.md +++ b/TODO.md @@ -14,3 +14,4 @@ - Case insensitive properties and sections - Escape characters - Support multi-line values with backslash + - Example diff --git a/source/mirage/java.d b/source/mirage/java.d index ef6b897..96f97aa 100644 --- a/source/mirage/java.d +++ b/source/mirage/java.d @@ -46,6 +46,9 @@ ConfigDictionary parseJavaProperties(const string properties) { return new JavaPropertiesFactory().parseConfig(properties); } +/// ditto +alias parseJavaConfig = parseJavaProperties; + /** * Load a Java properties file from disk. * @@ -57,6 +60,9 @@ ConfigDictionary loadJavaProperties(const string filePath) { return new JavaPropertiesFactory().loadFile(filePath); } +/// ditto +alias loadJavaConfig = loadJavaProperties; + version (unittest) { import std.exception : assertThrown; import std.process : environment; @@ -108,7 +114,7 @@ version (unittest) { @("Values and keys are trimmed") unittest { - auto config = parseJavaProperties(" + auto config = parseJavaConfig(" one = money ");