From 4c9f007be754428f243491a0e181286554adb196 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Sun, 9 Oct 2022 00:05:33 +0300 Subject: [PATCH] Use generic loadconfig in format non-specific examples --- examples/manipulation/app.d | 4 ++-- examples/valueSubstitution/app.d | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/manipulation/app.d b/examples/manipulation/app.d index e4dd5a8..fdfd9fd 100644 --- a/examples/manipulation/app.d +++ b/examples/manipulation/app.d @@ -9,12 +9,12 @@ module examples.manipulation.app; * The full terms of the license can be found in the LICENSE file. */ -import mirage.json : loadJsonConfig; +import mirage.config : loadConfig; import std.stdio : writeln; void main() { - auto config = loadJsonConfig("config.json"); + auto config = loadConfig("config.json"); config.set("application.name", "Real HTTP Server"); auto applicationName = config.get("application.name"); diff --git a/examples/valueSubstitution/app.d b/examples/valueSubstitution/app.d index 28bbb39..4cb7881 100644 --- a/examples/valueSubstitution/app.d +++ b/examples/valueSubstitution/app.d @@ -7,7 +7,7 @@ * The full terms of the license can be found in the LICENSE file. */ -import mirage.json : loadJsonConfig, parseJsonConfig; +import mirage.config : loadConfig; import std.stdio : writeln; import std.process : environment; @@ -17,7 +17,7 @@ void main() { // environment variables or other configuration paths. environment["CONFIG_EXAMPLE_SUBJECT"] = "world"; - auto config = loadJsonConfig("config.json"); + auto config = loadConfig("config.json"); // Can be done with other formats too. writeln(config.get("start")); // "Hello world! Enjoy your day!" writeln(config.get("end")); // "Bye!"