Smoothing out the cli output a bit
This commit is contained in:
@@ -7,7 +7,7 @@ pub(crate) fn parse_args() -> Args {
|
||||
args
|
||||
}
|
||||
|
||||
/// Simple program to greet a person
|
||||
/// A P2P smart contract execution node
|
||||
#[derive(Parser)]
|
||||
#[command(version, about, long_about = None)]
|
||||
pub(crate) struct Args {
|
||||
@@ -19,5 +19,7 @@ pub(crate) struct Args {
|
||||
pub(crate) enum Commands {
|
||||
/// runs the Side Node
|
||||
Run {},
|
||||
|
||||
/// initializes the Side Node with a new keypair
|
||||
Init {},
|
||||
}
|
||||
|
||||
3
side-node/src/init.rs
Normal file
3
side-node/src/init.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
pub(crate) fn init() {
|
||||
println!("Initializing Side Node")
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
use cli::{parse_args, Commands};
|
||||
|
||||
pub(crate) mod cli;
|
||||
pub(crate) mod init;
|
||||
pub(crate) mod websocket;
|
||||
|
||||
#[tokio::main]
|
||||
@@ -9,11 +10,11 @@ async fn main() {
|
||||
|
||||
match &args.command {
|
||||
Some(Commands::Init {}) => {
|
||||
println!("Initializing Side Node")
|
||||
init::init();
|
||||
}
|
||||
Some(Commands::Run {}) => {
|
||||
websocket::start().await.unwrap();
|
||||
}
|
||||
None => todo!(),
|
||||
None => println!("No command provided. Exiting. See --help for more information."),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user