mirror of
https://github.com/mbierlee/mirage-config.git
synced 2024-11-14 20:34:00 +01:00
Add java load aliases for the unaware
This commit is contained in:
parent
9eac0515a1
commit
6661ef73b4
1
TODO.md
1
TODO.md
|
@ -14,3 +14,4 @@
|
|||
- Case insensitive properties and sections
|
||||
- Escape characters
|
||||
- Support multi-line values with backslash
|
||||
- Example
|
||||
|
|
|
@ -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
|
||||
");
|
||||
|
||||
|
|
Loading…
Reference in a new issue