remove rpc, cli start
This commit is contained in:
12
src/cli/add.rs
Normal file
12
src/cli/add.rs
Normal file
@ -0,0 +1,12 @@
|
||||
use clap::{ArgMatches, Command, arg};
|
||||
|
||||
pub fn create_subcommand() -> Command {
|
||||
Command::new("add")
|
||||
.about("add a server")
|
||||
.arg(arg!(<NAME> "Name of the server"))
|
||||
.arg(arg!(-v --version <VERSION> "minecraft version of the server"))
|
||||
}
|
||||
|
||||
pub fn subcommand(arg: &ArgMatches) {
|
||||
println!("got add, sub : {:?}", arg);
|
||||
}
|
||||
6
src/cli/edit.rs
Normal file
6
src/cli/edit.rs
Normal file
@ -0,0 +1,6 @@
|
||||
use clap::{Command, arg};
|
||||
|
||||
pub fn create_subcommand() -> Command {
|
||||
Command::new("edit")
|
||||
.about("edit a server")
|
||||
}
|
||||
6
src/cli/ls.rs
Normal file
6
src/cli/ls.rs
Normal file
@ -0,0 +1,6 @@
|
||||
use clap::{Command, arg};
|
||||
|
||||
pub fn create_subcommand() -> Command {
|
||||
Command::new("ls")
|
||||
.about("list the servers")
|
||||
}
|
||||
4
src/cli/mod.rs
Normal file
4
src/cli/mod.rs
Normal file
@ -0,0 +1,4 @@
|
||||
pub mod add;
|
||||
pub mod edit;
|
||||
pub mod remove;
|
||||
pub mod ls;
|
||||
6
src/cli/remove.rs
Normal file
6
src/cli/remove.rs
Normal file
@ -0,0 +1,6 @@
|
||||
use clap::{Command, arg};
|
||||
|
||||
pub fn create_subcommand() -> Command {
|
||||
Command::new("remove")
|
||||
.about("remove a server")
|
||||
}
|
||||
Reference in New Issue
Block a user