cli icon indicating copy to clipboard operation
cli copied to clipboard

Error on invalid struct tags

Open kevinburkesegment opened this issue 3 years ago • 2 comments

I forgot to put quotes around my struct tags so no help text appeared. It might be nice if possible if there's an option to error in that case instead of just proceeding silently.

kevinburkesegment avatar Feb 10 '22 18:02 kevinburkesegment

@kevinburkesegment Do you have an example that you can share?

This may be tricky because the tags may have been turned out syntactically valid, and the library somehow decided from what it got that there was no help text to display.

bhavanki avatar Nov 04 '22 14:11 bhavanki

I think literally like

	Debug    bool     `flag:"-d,--debug"    help:Enable debug logs`

instead of

	Debug    bool     `flag:"-d,--debug"    help:"Enable debug logs"`

kevinburkesegment avatar Nov 04 '22 17:11 kevinburkesegment