Builds a --port flag that only accepts a valid port number. The flag parses its
value as an integer and rejects anything that isn't a whole number between 1 and
65535, so commands fail with a clear message instead of crashing on an out-of-range
port. The accepted range is appended to the description so it shows up in --help.
Builds a
--portflag that only accepts a valid port number. The flag parses its value as an integer and rejects anything that isn't a whole number between 1 and 65535, so commands fail with a clear message instead of crashing on an out-of-range port. The accepted range is appended to the description so it shows up in--help.