Skip to content

Commit

Permalink
Explain OnInitialize better in the GoDoc (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
flimzy authored and n10v committed Dec 6, 2017
1 parent de2d9c4 commit c156af3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cobra.go
Expand Up @@ -70,7 +70,8 @@ func AddTemplateFuncs(tmplFuncs template.FuncMap) {
}
}

// OnInitialize takes a series of func() arguments and appends them to a slice of func().
// OnInitialize sets the passed functions to be run when each command's
// Execute method is called.
func OnInitialize(y ...func()) {
initializers = append(initializers, y...)
}
Expand Down

0 comments on commit c156af3

Please sign in to comment.