mirror of
https://github.com/spf13/cobra
synced 2025-05-06 05:17:21 +00:00
Fix OnInitializeE
This commit is contained in:
parent
4cf9a0c444
commit
380782a995
1 changed files with 1 additions and 1 deletions
2
cobra.go
2
cobra.go
|
@ -80,7 +80,7 @@ func OnInitialize(y ...func()) {
|
|||
// OnInitializeE sets the passed functions to be run when each command's
|
||||
// Execute method is called.
|
||||
func OnInitializeE(y ...func() error) {
|
||||
initializers = append(initializers, y...)
|
||||
initializersWithError = append(initializersWithError, y...)
|
||||
}
|
||||
|
||||
// FIXME Gt is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra.
|
||||
|
|
Loading…
Add table
Reference in a new issue