Simplify OnInitialize func
This commit is contained in:
parent
71a9c0834b
commit
101d434d44
4
cobra.go
4
cobra.go
@ -61,9 +61,7 @@ func AddTemplateFuncs(tmplFuncs template.FuncMap) {
|
|||||||
|
|
||||||
//OnInitialize takes a series of func() arguments and appends them to a slice of func().
|
//OnInitialize takes a series of func() arguments and appends them to a slice of func().
|
||||||
func OnInitialize(y ...func()) {
|
func OnInitialize(y ...func()) {
|
||||||
for _, x := range y {
|
initializers = append(initializers, y...)
|
||||||
initializers = append(initializers, x)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Gt takes two types and checks whether the first type is greater than the second. In case of types Arrays, Chans,
|
//Gt takes two types and checks whether the first type is greater than the second. In case of types Arrays, Chans,
|
||||||
|
Loading…
Reference in New Issue
Block a user