git_project/
lib.rs

1mod commands;
2pub mod err;
3mod explore;
4pub mod options;
5mod util;
6
7use crate::commands::{check, clone, list, organize, gen_completions};
8
9#[cfg(test)]
10mod test;
11
12use crate::err::Result;
13use crate::options::Options;
14
15pub fn run(opts: &Options) -> Result<()> {
16    match &opts.command {
17        options::Command::Clone(clone_opts) => clone::run(&clone_opts),
18        options::Command::List(list_opts) => list::run(&list_opts),
19        options::Command::Check(list_opts) => check::run(&list_opts),
20        options::Command::Organize(organize_opts) => organize::run(&organize_opts),
21        options::Command::GenCompletions(completion_opts) => gen_completions::run(&completion_opts),
22    }
23}