X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/5f81d796fed4e4efbaf6dbed7d3c69481afddeb3..43780806ca226bde306131141a619b80d3ab74a3:/src/command/status/mod.rs diff --git a/src/command/status/mod.rs b/src/command/status/mod.rs index ba73184..e620f78 100644 --- a/src/command/status/mod.rs +++ b/src/command/status/mod.rs @@ -1,6 +1,8 @@ mod configuration_status; +mod blog_status; use std::io::Result; +use crate::configuration::Configuration; pub struct Status; @@ -15,10 +17,10 @@ impl super::Command for Status { vec![] } - fn execute(&self, _: Option<&String>) -> Result<()> { + fn execute(&self, _: Option<&String>, configuration: &Configuration, _: &String) -> Result<()> { let status_providers = available_status_providers(); for status_provider in status_providers { - println!("{}", status_provider()); + println!("{}\n----\n", status_provider(configuration)); } return Ok(()) } @@ -36,8 +38,9 @@ impl super::Command for Status { } } -fn available_status_providers() -> Vec String> { +fn available_status_providers() -> Vec String> { vec![ configuration_status::status, + blog_status::status, ] }