Skip to content
Myr

Simplify OnInitialize func

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

authored by bogem · committed by bogem · parent 71a9c08 · Browse files · 1 file+1 added−3 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+1 added−3 removed

  • other:+1 added−3 removed

1 file+1 added−3 removed

modified:cobra.go+1 added-3 removed
59 unmodified lines
60}6162//OnInitialize takes a series of func() arguments and appends them to a slice of func().63func OnInitialize(y ...func()) {64 for _, x := range y {65 initializers = append(initializers, x)64 initializers = append(initializers, y...)66 }65}6667//Gt takes two types and checks whether the first type is greater than the second. In case of types Arrays, Chans,68//Maps and Slices, Gt will compare their lengths. Ints are compared directly while strings are first parsed as
105 unmodified lines