Fix OnInitializeE

This commit is contained in:
Wayne Warren 2018-12-20 10:24:59 -06:00
parent 4cf9a0c444
commit 380782a995

View file

@ -80,7 +80,7 @@ func OnInitialize(y ...func()) {
// OnInitializeE sets the passed functions to be run when each command's // OnInitializeE sets the passed functions to be run when each command's
// Execute method is called. // Execute method is called.
func OnInitializeE(y ...func() error) { 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. // FIXME Gt is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra.