]> git.proxmox.com Git - rustc.git/blame - vendor/clap-4.2.1/examples/tutorial_derive/04_02_validate.md
New upstream version 1.71.1+dfsg1
[rustc.git] / vendor / clap-4.2.1 / examples / tutorial_derive / 04_02_validate.md
CommitLineData
49aad941
FG
1```console
2$ 04_02_validate_derive --help
3A simple to use, efficient, and full-featured Command Line Argument Parser
4
5Usage: 04_02_validate_derive[EXE] <PORT>
6
7Arguments:
8 <PORT> Network port to use
9
10Options:
11 -h, --help Print help
12 -V, --version Print version
13
14$ 04_02_validate_derive 22
15PORT = 22
16
17$ 04_02_validate_derive foobar
18? failed
19error: invalid value 'foobar' for '<PORT>': `foobar` isn't a port number
20
21For more information, try '--help'.
22
23$ 04_02_validate_derive 0
24? failed
25error: invalid value '0' for '<PORT>': port not in range 1-65535
26
27For more information, try '--help'.
28
29```