Got Array(T) working in flag.cr. Hacky stuff it is to convince the compiler that a value isn't going to be nil if I set it
This commit is contained in:
+5
-7
@@ -44,22 +44,20 @@ module MyModule
|
||||
"myutil mycommand do_thing --myvar 5"
|
||||
]
|
||||
|
||||
subcommand do_thing : Int32,
|
||||
description: "Do the THING",
|
||||
examples: MyModule::MyCommand::DO_THING_EXAMPLES \
|
||||
do
|
||||
subcommand do_thing, description: "Do the THING", examples: MyModule::MyCommand::DO_THING_EXAMPLES do
|
||||
|
||||
output = 0
|
||||
|
||||
@myvar.times do |i|
|
||||
puts "thing done %i times" % [ i + 1 ]
|
||||
output += i
|
||||
end
|
||||
|
||||
output
|
||||
|
||||
puts "Total : %i" % output
|
||||
end
|
||||
end
|
||||
|
||||
CliGen::App.process(ARGV)
|
||||
CliGen::App.process
|
||||
end
|
||||
----
|
||||
|
||||
|
||||
Reference in New Issue
Block a user