1
0
Fork 0
mirror of https://github.com/spf13/cobra synced 2025-04-17 12:18:16 +00:00

Explain OnInitialize better in the GoDoc ()

This commit is contained in:
Jonathan Hall 2017-12-06 19:18:45 +01:00 committed by Albert Nigmatzianov
parent de2d9c4eca
commit c156af3984

View file

@ -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...)
}