-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restyle Feat - first cli basic implementation (#35)
* Restyled by rustfmt * Restyled by whitespace --------- Co-authored-by: Restyled.io <commits@restyled.io>
- Loading branch information
1 parent
e44c2ff
commit 19d1100
Showing
9 changed files
with
22 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pub mod parser; | ||
pub mod parser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,22 @@ | ||
pub use clap::Parser; | ||
|
||
|
||
/// # Command line arguments for the CLI | ||
/// | ||
/// | ||
/// > This struct is used to parse the command line arguments | ||
/// | ||
/// | ||
/// ## Example | ||
/// | ||
/// | ||
/// ```sh | ||
/// worker -H 192.168.1.0 -P 3000 -N my_group_name | ||
/// ``` | ||
#[derive(Parser, Debug)] | ||
pub struct CliArgs { | ||
#[clap( | ||
short = 'H', | ||
long = "hostname", | ||
default_value = "localhost" | ||
)] | ||
#[clap(short = 'H', long = "hostname", default_value = "localhost")] | ||
pub hostname: String, | ||
|
||
#[clap( | ||
short = 'P', | ||
long = "port", | ||
default_value = "8787" | ||
)] | ||
#[clap(short = 'P', long = "port", default_value = "8787")] | ||
pub port: u16, | ||
|
||
#[clap( | ||
short = 'N', | ||
long = "name", | ||
default_value = "worker" | ||
)] | ||
#[clap(short = 'N', long = "name", default_value = "worker")] | ||
pub worker_name: String, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pub mod networking; | ||
pub mod image; | ||
pub mod julia; | ||
pub mod networking; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pub mod connect; | ||
pub mod reader; | ||
pub mod write; | ||
pub mod reader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters