upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-09-04 08:04:48 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-09-04 13:30:59 +0100
commit949c6459aa7683453a7160423b689ceadb08954b (patch)
tree230c26ecb11b99916e5570e548673eb09ecf0a36 /src/main.rs
parenta825311f2c55661aaab3a163bda9109295c96044 (diff)
refactor: organise into lib and bin structure
the make the code more readable this commit just moves the files, the next commit should fix the imports
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/main.rs b/src/main.rs
deleted file mode 100644
index e833e4a..0000000
--- a/src/main.rs
+++ /dev/null
@@ -1,32 +0,0 @@
1#![cfg_attr(not(test), warn(clippy::pedantic))]
2#![allow(clippy::large_futures)]
3#![cfg_attr(not(test), warn(clippy::expect_used))]
4
5use anyhow::Result;
6use clap::Parser;
7use cli::{Cli, Commands};
8
9mod cli;
10mod cli_interactor;
11mod client;
12mod config;
13mod git;
14mod key_handling;
15mod login;
16mod repo_ref;
17mod repo_state;
18mod sub_commands;
19
20#[tokio::main]
21async fn main() -> Result<()> {
22 let cli = Cli::parse();
23 match &cli.command {
24 Commands::Fetch(args) => sub_commands::fetch::launch(&cli, args).await,
25 Commands::Login(args) => sub_commands::login::launch(&cli, args).await,
26 Commands::Init(args) => sub_commands::init::launch(&cli, args).await,
27 Commands::Send(args) => sub_commands::send::launch(&cli, args, false).await,
28 Commands::List => sub_commands::list::launch().await,
29 Commands::Pull => sub_commands::pull::launch().await,
30 Commands::Push(args) => sub_commands::push::launch(&cli, args).await,
31 }
32}