Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
cli
/
testdata
/
default_version_flag_no_command.vv
13
lines
·
12
sloc
·
222 bytes
·
c0fec31bef12ca36b2df70d4327e016688891f10
Raw
1
import cli { Command, CommandFlag }
2
3
fn main() {
4
mut cmd := Command{
5
name: 'foo'
6
version: '0.1.0'
7
posix_mode: true
8
defaults: struct {
9
version: CommandFlag{false, true}
10
}
11
}
12
cmd.parse(['foo', '--version'])
13
}
14