Add App.InvalidFlagAccessHandler (#1446)

* Add App.UnknownFlagHandler

* Rename App.UnknownFlagHandler to App.InvalidFlagAccessHandler

* Traverse parent contexts
This commit is contained in:
Ilia Choly
2022-08-30 18:51:16 -04:00
committed by GitHub
parent 254c38ea72
commit ca9df40abd
4 changed files with 57 additions and 1 deletions

2
app.go
View File

@@ -78,6 +78,8 @@ type App struct {
CommandNotFound CommandNotFoundFunc
// Execute this function if a usage error occurs
OnUsageError OnUsageErrorFunc
// Execute this function when an invalid flag is accessed from the context
InvalidFlagAccessHandler InvalidFlagAccessFunc
// Compilation date
Compiled time.Time
// List of all authors who contributed