mod blog_status; mod configuration_status; use crate::configuration::Configuration; use std::io::Result; pub struct Status; impl Status { pub fn new() -> Self { Status } } impl super::Command for Status { fn before_dependencies(&self) -> Vec> { vec![] } fn execute(&self, _: Option<&String>, configuration: &Configuration, _: &str) -> Result<()> { let status_providers = available_status_providers(); for status_provider in status_providers { println!("{}\n----\n", status_provider(configuration)); } Ok(()) } fn after_dependencies(&self) -> Vec> { vec![] } fn command(&self) -> &'static str { "status" } fn help(&self) -> &'static str { "\t\t\t\tPrints the status of your blog" } } fn available_status_providers() -> Vec String> { vec![configuration_status::status, blog_status::status] }