getopt icon indicating copy to clipboard operation
getopt copied to clipboard

IsSet crashes on unknown option names

Open jfesler opened this issue 5 years ago • 0 comments

Querying (*Set).IsSet() for a flag name not actually defined causes a nil ptr crash instead of returning false.

I'm unable to provide demo code (much less a fix) due to CLA conflicts; hopefully this is enough of a report. I'm working around it for now by using .VisitAlI().

jfesler avatar Dec 08 '19 23:12 jfesler