aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 7280aed..86ab51a 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -10,9 +10,17 @@ const CONFIG_NAME: &str = "almanac.toml";
#[derive(Deserialize)]
pub struct Config {
pub cals: Vec<String>,
+ pub period: String,
}
impl Config {
+ pub fn new() -> Config {
+ Config {
+ cals: vec![],
+ period: "".to_string(),
+ }
+ }
+
pub fn parse() -> Result<Config, ConfigError> {
let config_path = match dirs::config_dir() {
Some(path) => path,