pflag
pflag is a port of the spf13's popular fork of the
Go package by the same name.
Usage
use ;
use ;
let mut flags = new;
// Use higher level methods over add_flag directly.
flags.int8;
flags.string_p;
flags.ip_addr_slice;
let args = "--num=1 -s world --addrs 192.168.1.1,192.168.0.1 --addrs=127.0.0.1 subcommand";
if let Err = flags.parse
// Retrieving value is very easy with the value_of method.
assert_eq!;
assert_eq!;
assert_eq!;
// Any non-flag args i.e. positional args can be retrieved by...
let args = flags.args;
assert_eq!;
assert_eq!;