mirror of
https://github.com/spf13/cobra
synced 2024-12-28 07:17:06 +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().
|
||||
func OnInitialize(y ...func()) {
|
||||
for _, x := range y {
|
||||
initializers = append(initializers, x)
|
||||
}
|
||||
initializers = append(initializers, y...)
|
||||
}
|
||||
|
||||
//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