2022-07-19 18:29:31 +00:00
|
|
|
```console
|
2022-08-08 19:05:08 +00:00
|
|
|
$ 04_02_parse_derive --help
|
2022-07-19 18:29:31 +00:00
|
|
|
A simple to use, efficient, and full-featured Command Line Argument Parser
|
|
|
|
|
2022-09-07 16:03:55 +00:00
|
|
|
Usage: 04_02_parse_derive[EXE] <PORT>
|
2022-07-19 18:29:31 +00:00
|
|
|
|
2022-08-26 14:40:23 +00:00
|
|
|
Arguments:
|
2022-09-07 20:29:15 +00:00
|
|
|
<PORT> Network port to use
|
2022-07-19 18:29:31 +00:00
|
|
|
|
2022-08-26 14:40:23 +00:00
|
|
|
Options:
|
2022-09-07 20:29:15 +00:00
|
|
|
-h, --help Print help information
|
|
|
|
-V, --version Print version information
|
2022-07-19 18:29:31 +00:00
|
|
|
|
2022-08-08 19:05:08 +00:00
|
|
|
$ 04_02_parse_derive 22
|
2022-07-19 18:29:31 +00:00
|
|
|
PORT = 22
|
|
|
|
|
2022-08-08 19:05:08 +00:00
|
|
|
$ 04_02_parse_derive foobar
|
2022-07-19 18:29:31 +00:00
|
|
|
? failed
|
2022-10-13 15:45:38 +00:00
|
|
|
error: Invalid value 'foobar' for '<PORT>': invalid digit found in string
|
2022-07-19 18:29:31 +00:00
|
|
|
|
2022-09-15 19:22:28 +00:00
|
|
|
For more information try '--help'
|
2022-07-19 18:29:31 +00:00
|
|
|
|
|
|
|
$ 04_02_parse_derive 0
|
|
|
|
? failed
|
2022-10-13 15:45:38 +00:00
|
|
|
error: Invalid value '0' for '<PORT>': 0 is not in 1..=65535
|
2022-07-19 18:29:31 +00:00
|
|
|
|
2022-09-15 19:22:28 +00:00
|
|
|
For more information try '--help'
|
2022-07-19 18:29:31 +00:00
|
|
|
|
|
|
|
```
|