]> git.r.bdr.sh - rbdr/blog/blobdiff - src/command/add_remote.rs
Add logic skeleton for rust version
[rbdr/blog] / src / command / add_remote.rs
diff --git a/src/command/add_remote.rs b/src/command/add_remote.rs
new file mode 100644 (file)
index 0000000..3d90103
--- /dev/null
@@ -0,0 +1,32 @@
+use std::io::Result;
+
+pub struct AddRemote;
+
+impl AddRemote {
+    pub fn new() -> Self {
+        AddRemote
+    }
+}
+
+impl super::Command for AddRemote {
+    fn before_dependencies(&self) -> Vec<Box<dyn super::Command>> {
+        vec![]
+    }
+
+    fn execute(&self, input: Option<&String>) -> Result<()> {
+        println!("Add Remote: {:?}!", input);
+        return Ok(())
+    }
+
+    fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {
+        vec![]
+    }
+
+    fn command(&self) -> &'static str {
+        "add-remote"
+    }
+
+    fn help(&self) -> &'static str {
+        "<git_url>\t\tAdds or updates a git remote to sync with"
+    }
+}