We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de2d9c4 commit c156af3Copy full SHA for c156af3
cobra.go
@@ -70,7 +70,8 @@ func AddTemplateFuncs(tmplFuncs template.FuncMap) {
70
}
71
72
73
-// 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
74
+// Execute method is called.
75
func OnInitialize(y ...func()) {
76
initializers = append(initializers, y...)
77
0 commit comments