diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-02-23 20:37:39 +0000 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-02-23 20:37:39 +0000 |
| commit | d620665f6b2e1ae5db4c98a09e35bd63133ae87f (patch) | |
| tree | 964bf044d3e1ae880c65d252e7c702f81874f2bc /src/command/update.rs | |
| parent | 72c91149425d45b0517bda929d459fc02f5603cc (diff) | |
Add logic skeleton for rust version
Diffstat (limited to 'src/command/update.rs')
| -rw-r--r-- | src/command/update.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/command/update.rs b/src/command/update.rs new file mode 100644 index 0000000..d251093 --- /dev/null +++ b/src/command/update.rs @@ -0,0 +1,33 @@ +use std::io::Result; + +pub struct Update; + +impl Update { + pub fn new() -> Self { + Update + } +} + +impl super::Command for Update { + fn before_dependencies(&self) -> Vec<Box<dyn super::Command>> { + vec![] + } + + fn execute(&self, input: Option<&String>) -> Result<()> { + println!("Update: {:?}!", input); + return Ok(()) + } + + fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> { + vec![] + } + + fn command(&self) -> &'static str { + "update" + } + + fn help(&self) -> &'static str { + "<path_to_post>\t\tUpdates latest blog post" + } +} + |