mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
flag: fix compilation of programs using flag module
This commit is contained in:
parent
292b165abe
commit
3fd547f2e5
@ -447,12 +447,13 @@ pub fn (fs FlagParser) usage() string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
option_names := ' ' + onames.join(', ')
|
option_names := ' ' + onames.join(', ')
|
||||||
space := if option_names.len > space.len-2 {
|
xspace := ''
|
||||||
'\n${space}'
|
if option_names.len > space.len-2 {
|
||||||
|
xspace = '\n${space}'
|
||||||
} else {
|
} else {
|
||||||
space[option_names.len..]
|
xspace = space[option_names.len..]
|
||||||
}
|
}
|
||||||
use += '${option_names}${space}${f.usage}\n'
|
use += '${option_names}${xspace}${f.usage}\n'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user