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