From 973317bab5651f94b27d134fed9e0da91a3b69ee Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Mon, 31 Oct 2022 22:07:13 +0300 Subject: [PATCH] Add documentation to loadConfig --- source/mirage/config.d | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/mirage/config.d b/source/mirage/config.d index 2634f27..79f64ea 100644 --- a/source/mirage/config.d +++ b/source/mirage/config.d @@ -594,6 +594,14 @@ abstract class ConfigFactory { ConfigDictionary parseConfig(string contents); } +/** + * Load config from disk. + * A specific loader will be used based on the file's extension. + * Params: + * configPath = Path to the configuration file. + * Returns: The loaded configuration. + * Throws: ConfigCreationException when the file's extension is unrecognized. + */ ConfigDictionary loadConfig(const string configPath) { auto extension = configPath.extension.toLower; if (extension == ".json") {