mirror of
https://github.com/spf13/cobra
synced 2025-05-05 04:47:22 +00:00
Add better godoc
This commit is contained in:
parent
101498514a
commit
e21b4f4fd2
1 changed files with 3 additions and 1 deletions
4
cobra.go
4
cobra.go
|
@ -87,7 +87,9 @@ func OnInitialize(y ...func()) {
|
|||
}
|
||||
|
||||
// OnInitializeE sets the passed functions to be run when each command's
|
||||
// Execute method is called.
|
||||
// Execute method is called. It will early stop command's execution
|
||||
// before any hooks are called if an error is returned by at least one
|
||||
// of the initializers.
|
||||
func OnInitializeE(y ...func() error) {
|
||||
initializersE = append(initializersE, y...)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue