change RequiredFlagsErr to RequiredFlagErr, update to struct for custom message

This commit is contained in:
Aaron Berns
2019-08-20 14:50:57 -04:00
parent fffdd82c00
commit eb1734ba59
3 changed files with 256 additions and 165 deletions

View File

@@ -85,10 +85,12 @@ type RequiredFlag interface {
// 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 {
type RequiredFlagErr interface {
Flag
FlagsErrRequired() bool
IsCustom() bool
GetMessage() string
HasInterpolation() bool
}
// DocGenerationFlag is an interface that allows documentation generation for the flag