-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically read license field from Cargo.toml
- Loading branch information
1 parent
5847303
commit 6898fbd
Showing
11 changed files
with
64 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ fn main() { | |
.version("1.0") | ||
.author("Kevin K. <[email protected]>") | ||
.about("Does awesome things") | ||
.license("MIT OR Apache-2.0") | ||
.arg("-c, --config=[FILE] 'Sets a custom config file'") | ||
.arg("<output> 'Sets an optional output file'") | ||
.arg("-d..., --debug... 'Turn debugging information on'") | ||
|
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 |
---|---|---|
|
@@ -35,6 +35,7 @@ fn main() { | |
.version("1.0") | ||
.author("Kevin K. <[email protected]>") | ||
.about("Does awesome things") | ||
.license("MIT OR Apache-2.0") | ||
.arg( | ||
Arg::new("config") | ||
.short('c') | ||
|
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 |
---|---|---|
|
@@ -32,6 +32,7 @@ fn main() { | |
(version: "1.0") | ||
(author: "Kevin K. <[email protected]>") | ||
(about: "Does awesome things") | ||
(license: "MIT OR Apache-2.0") | ||
(@arg CONFIG: -c --config +takes_value "Sets a custom config file") | ||
(@arg INPUT: +required "Sets the input file to use") | ||
(@arg debug: -d ... "Sets the level of debugging information") | ||
|
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ fn main() { | |
.version("1.0") | ||
.author("Kevin K. <[email protected]>") | ||
.about("Does awesome things") | ||
.license("MIT OR Apache-2.0") | ||
.get_matches(); | ||
|
||
// This example doesn't do much, but it *does* give automatic -h, --help, -V, and --version functionality ;) | ||
|
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ fn main() { | |
// argument. | ||
let matches = App::new("MyApp") | ||
.about("Parses an input file to do awesome things") | ||
.license("MIT OR Apache-2.0") | ||
.version("1.0") | ||
.author("Kevin K. <[email protected]>") | ||
.arg( | ||
|
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
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
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