Skip to content

flag: add optional value description to string parameters - #22024

Merged
spytheman merged 1 commit into
vlang:masterfrom
kimshrier:string-val-desc
Aug 11, 2024
Merged

spytheman merged 1 commit into
vlang:masterfrom
kimshrier:string-val-desc

Conversation

@kimshrier

Copy link
Copy Markdown
Contributor

When using command line flags with string parameters, I found that the default val_desc values used were not as descriptive as I would like. And there was no way to override val_desc to a more descriptive value.

Using trailing struct literal arguments, I was able to add this capability without breaking any existing code.

I only did this for string parameters since that seemed to me to be the place where it would be most useful. It could easily be added to the other types if desired.

Comment thread vlib/flag/flag.v
@spytheman

Copy link
Copy Markdown
Contributor

I only did this for string parameters since that seemed to me to be the place where it would be most useful. It could easily be added to the other types if desired.

I think it would be useful for the others too.

@spytheman spytheman changed the title vlib/flag: add optional value description to string parameters flag: add optional value description to string parameters Aug 11, 2024
@spytheman
spytheman merged commit 20a525a into vlang:master Aug 11, 2024
@kimshrier
kimshrier deleted the string-val-desc branch September 7, 2024 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants