libreadconfig

This is a rust library that is meant to help with using config files.

Usage

Using the library is very simple, the following is an example to get you started:

sh user@example $ cat /tmp/example.conf cat: /tmp/example.conf: No such file or directory user@example $ cat /etc/example.conf name foo surname bar very_important_option fizz user@example $ cat /var/example.conf name bar surname foo very_important_option fizz

```rust extern crate readconfig

use readconfig::Configuration;

fn main() { let cfg = Configuration::new(&["/tmp/example.conf", "/etc/example.conf", "/var/example.conf"]).unwrap(); println!("{}", cfg.get_option("name").unwrap()); } ```

sh user@example $ ./executable foo

The result here is foo since it is the value contained within the first valid configuration file.