]> git.r.bdr.sh - rbdr/blog/blob - src/command/add_remote.rs
c98330fbf7d94fdeae7c64abb841b56c1d5f4c13
[rbdr/blog] / src / command / add_remote.rs
1 use std::io::Result;
2 use crate::configuration::Configuration;
3
4 pub struct AddRemote;
5
6 impl AddRemote {
7 pub fn new() -> Self {
8 AddRemote
9 }
10 }
11
12 impl super::Command for AddRemote {
13 fn before_dependencies(&self) -> Vec<Box<dyn super::Command>> {
14 vec![]
15 }
16
17 fn execute(&self, input: Option<&String>, _: &Configuration, _: &String) -> Result<()> {
18 println!("Add Remote: {:?}!", input);
19 return Ok(())
20 }
21
22 fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {
23 vec![]
24 }
25
26 fn command(&self) -> &'static str {
27 "add-remote"
28 }
29
30 fn help(&self) -> &'static str {
31 "<git_url>\t\tAdds or updates a git remote to sync with"
32 }
33 }