use std::io::Result; use super::{sync_down::SyncDown, generate::Generate, sync_up::SyncUp}; pub struct Update; impl Update { pub fn new() -> Self { Update } } impl super::Command for Update { fn before_dependencies(&self) -> Vec> { vec![Box::new(SyncDown::new())] } fn execute(&self, input: Option<&String>) -> Result<()> { println!("Update: {:?}!", input); return Ok(()) } fn after_dependencies(&self) -> Vec> { vec![ Box::new(Generate::new()), Box::new(SyncUp::new()) ] } fn command(&self) -> &'static str { "update" } fn help(&self) -> &'static str { "\t\tUpdates latest blog post" } }