1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cli: improve multiple value management (#8310)

This commit is contained in:
Emeric MARTINEAU
2021-03-19 12:09:56 +01:00
committed by GitHub
parent dad5a5e774
commit 125236694f
3 changed files with 100 additions and 64 deletions

View File

@ -28,14 +28,13 @@ fn main() {
greet_cmd.add_flag(Flag{
flag: .int
name: 'times'
value: ['3']
default_value: ['3']
description: 'Number of times the message gets printed.'
})
greet_cmd.add_flag(Flag{
flag: .string
name: 'fun'
multiple: true
description: 'Just a dumby flags to show multiple.'
flag: .string_array
name: 'fun'
description: 'Just a dumby flags to show multiple.'
})
cmd.add_command(greet_cmd)
cmd.setup()