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:
Tristan Ancelet
2026-08-10 12:57:31 -05:00
parent ac5711c0df
commit 29327a3e83
17 changed files with 177 additions and 64 deletions
+5 -7
View File
@@ -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
----