diff options
author | Thayne McCombs <astrothayne@gmail.com> | 2017-02-03 22:02:48 -0700 |
---|---|---|
committer | Thayne McCombs <astrothayne@gmail.com> | 2017-02-03 22:02:48 -0700 |
commit | f82ca02c15b675ba889143aa7f7cd3c69e3f1810 (patch) | |
tree | f5448f1473899936eb6ed62b4e7fa34c34d62a69 /examples/file-yaml/src/main.rs | |
parent | 115fe07e2c11aa72e91a5ce9b028ed1c1ff7d806 (diff) |
Add support for YAML
Diffstat (limited to 'examples/file-yaml/src/main.rs')
-rw-r--r-- | examples/file-yaml/src/main.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/file-yaml/src/main.rs b/examples/file-yaml/src/main.rs new file mode 100644 index 0000000..cd3286f --- /dev/null +++ b/examples/file-yaml/src/main.rs @@ -0,0 +1,10 @@ +extern crate config; + +fn main() { + // Read configuration from "Settings.yaml" + config::merge(config::File::new("Settings", config::FileFormat::Yaml)).unwrap(); + + println!("debug = {:?}", config::get("debug")); + println!("pi = {:?}", config::get("pi")); + println!("weight = {:?}", config::get("weight")); +} |