diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -20,8 +20,8 @@ The `StreamingClap` is base of all the other parsers. It's a streaming parser th | |||
| 20 | 20 | ||
| 21 | ```rust | 21 | ```rust |
| 22 | const params = []clap.Param(u8){ | 22 | const params = []clap.Param(u8){ |
| 23 | clap.Param(u8).flag('h', false, clap.Names.both("help")), | 23 | clap.Param(u8).flag('h', clap.Names.both("help")), |
| 24 | clap.Param(u8).option('n', true, clap.Names.both("number")), | 24 | clap.Param(u8).option('n', clap.Names.both("number")), |
| 25 | clap.Param(u8).positional('f'), | 25 | clap.Param(u8).positional('f'), |
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| @@ -50,8 +50,8 @@ them available through three functions (`flag`, `option`, `positionals`). | |||
| 50 | 50 | ||
| 51 | ```rust | 51 | ```rust |
| 52 | const params = comptime []clap.Param(void){ | 52 | const params = comptime []clap.Param(void){ |
| 53 | clap.Param(void).flag({}, false, clap.Names.both("help")), | 53 | clap.Param(void).flag({}, clap.Names.both("help")), |
| 54 | clap.Param(void).option({}, true, clap.Names.both("number")), | 54 | clap.Param(void).option({}, clap.Names.both("number")), |
| 55 | clap.Param(void).positional({}), | 55 | clap.Param(void).positional({}), |
| 56 | }; | 56 | }; |
| 57 | 57 | ||
| @@ -78,7 +78,7 @@ program can take: | |||
| 78 | 78 | ||
| 79 | ```rust | 79 | ```rust |
| 80 | const params = comptime []clap.Param(void){ | 80 | const params = comptime []clap.Param(void){ |
| 81 | clap.Param(void).init({}, false, clap.Names.both("help")), | 81 | clap.Param(void).flag({}, clap.Names.both("help")), |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | var os_iter = clap.args.OsIterator.init(allocator); | 84 | var os_iter = clap.args.OsIterator.init(allocator); |