Skip to content
Myr

Explain OnInitialize better in the GoDoc (#594)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jonathan Hall · committed by Albert Nigmatzianov · parent de2d9c4 · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:cobra.go+2 added-1 removed
68 unmodified lines
69 templateFuncs[k] = v70 }71}7273// OnInitialize takes a series of func() arguments and appends them to a slice of func().73// OnInitialize sets the passed functions to be run when each command's74// Execute method is called.75func OnInitialize(y ...func()) {76 initializers = append(initializers, y...)77}78
122 unmodified lines