summaryrefslogtreecommitdiff
path: root/example/streaming-clap.zig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--example/streaming-clap.zig10
1 files changed, 0 insertions, 10 deletions
diff --git a/example/streaming-clap.zig b/example/streaming-clap.zig
index 013c1d4..57ebe71 100644
--- a/example/streaming-clap.zig
+++ b/example/streaming-clap.zig
@@ -10,18 +10,8 @@ pub fn main() !void {
10 10
11 // First we specify what parameters our program can take. 11 // First we specify what parameters our program can take.
12 const params = []clap.Param(u8){ 12 const params = []clap.Param(u8){
13 // Param.init takes 3 arguments.
14 // * An "id", which can be any type specified by the argument to Param. Here, we
15 // use a "u8" as the "id" type.
16 // * A bool which determins wether the parameter takes a value.
17 // * A "Names" struct, which determins what names the parameter will have on the
18 // commandline. Names.prefix inits a "Names" struct that has the "short" name
19 // set to the first letter, and the "long" name set to the full name.
20 clap.Param(u8).flag('h', clap.Names.prefix("help")), 13 clap.Param(u8).flag('h', clap.Names.prefix("help")),
21 clap.Param(u8).option('n', clap.Names.prefix("number")), 14 clap.Param(u8).option('n', clap.Names.prefix("number")),
22
23 // Names.positional returns a "Names" struct where neither the "short" or "long"
24 // name is set.
25 clap.Param(u8).positional('f'), 15 clap.Param(u8).positional('f'),
26 }; 16 };
27 17