/* package flags implements a command-line argument parser. It works by using Odin's run-time type information to determine where and how to store data on a struct provided by the program. Type conversion is handled automatically and errors are reported with useful messages. Command-Line Syntax: Arguments are treated differently depending on how they're formatted. The format is similar to the Odin binary's way of handling compiler flags. ``` type handling ------------ ------------------------ depends on struct layout - set a bool true - set flag to option - set flag to option, alternative syntax -:= set map[key] to value ``` Struct Tags: Users of the `core:encoding/json` package may be familiar with using tags to annotate struct metadata. The same technique is used here to annotate where arguments should go and which are required. Under the `args` tag, there are the following subtags: - `name=S`: set `S` as the flag's name. - `pos=N`: place positional argument `N` into this flag. - `hidden`: hide this flag from the usage documentation. - `required`: cause verification to fail if this argument is not set. - `variadic`: take all remaining arguments when set, UNIX-style only. - `file`: for `os.Handle` types, file open mode. - `perms`: for `os.Handle` types, file open permissions. - `indistinct`: allow the setting of distinct types by their base type. `required` may be given a range specifier in the following formats: ``` min