go-flagsfiller icon indicating copy to clipboard operation
go-flagsfiller copied to clipboard

How to make an option required?

Open FrankDMartinez opened this issue 4 years ago • 1 comments

While I might have missed it in the documentation, I saw nothing about how to make an option mandatory. Can Anyone point Me in the direction of such information?

Thanks in advance.

FrankDMartinez avatar Mar 20 '21 20:03 FrankDMartinez

Since this library builds on the built-in flags package, I hadn't yet found a way to make it indicate an error for required arguments that are missing. As a result, I resort to adding explicit conditionals after the flag loading to check for unset arguments.

itzg avatar Mar 20 '21 20:03 itzg