mirror of
https://github.com/mbierlee/mirage-config.git
synced 2024-11-14 20:34:00 +01:00
Add documentation to loadConfig
This commit is contained in:
parent
fec9c1ab71
commit
973317bab5
|
@ -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") {
|
||||
|
|
Loading…
Reference in a new issue