From 95f45c1e60e67a27f7095088e67196eb323628fd Mon Sep 17 00:00:00 2001 From: Aaron Berns Date: Mon, 19 Aug 2019 12:06:19 -0400 Subject: [PATCH] add RequiredFlagsErr interface --- flag.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flag.go b/flag.go index be55a33..abee563 100644 --- a/flag.go +++ b/flag.go @@ -83,6 +83,14 @@ type RequiredFlag interface { IsRequired() bool } +// RequiredFlagsErr is an interface that allows users to redefine errors on required flags +// it allows flags with user-defined errors to be backwards compatible with the Flag interface +type RequiredFlagsErr interface { + Flag + + IsRequired() bool +} + // DocGenerationFlag is an interface that allows documentation generation for the flag type DocGenerationFlag interface { Flag