mirror of
https://github.com/spf13/cobra
synced 2024-11-24 22:57:12 +00:00
Simplify OnInitialize func
This commit is contained in:
parent
71a9c0834b
commit
101d434d44
1 changed files with 1 additions and 3 deletions
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 a new issue