Removed double parsing of options.

This commit is contained in:
Gerald Kaszuba
2018-06-03 17:22:32 +10:00
parent ca0490fe2a
commit c8b487e49c
-4
View File
@@ -53,10 +53,6 @@ func New(grammar interface{}, options ...Option) (*Kong, error) {
hooks: map[reflect.Value]HookFunction{},
}
for _, option := range options {
option(k)
}
model, err := build(grammar, k.extraFlags())
if err != nil {
return k, err