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:
|
2023-01-03 16:49:43 +00:00
|
|
|
-h, --help Print help
|
|
|
|
-V, --version Print version
|
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
|
2023-01-03 16:22:40 +00:00
|
|
|
error: invalid value 'foobar' for '<PORT>': invalid digit found in string
|
2022-07-19 18:29:31 +00:00
|
|
|
|
2023-01-03 19:22:35 +00:00
|
|
|
For more information, try '--help'.
|
2022-07-19 18:29:31 +00:00
|
|
|
|
|
|
|
$ 04_02_parse_derive 0
|
|
|
|
? failed
|
2023-01-03 16:22:40 +00:00
|
|
|
error: invalid value '0' for '<PORT>': 0 is not in 1..=65535
|
2022-07-19 18:29:31 +00:00
|
|
|
|
2023-01-03 19:22:35 +00:00
|
|
|
For more information, try '--help'.
|
2022-07-19 18:29:31 +00:00
|
|
|
|
|
|
|
```
|