errorableFlag: scope result of type assertion.
This commit is contained in:
parent
b4f4786f37
commit
4661a59b20
4
flag.go
4
flag.go
@ -76,8 +76,8 @@ func flagSet(name string, flags []Flag) (*flag.FlagSet, error) {
|
|||||||
|
|
||||||
for _, f := range flags {
|
for _, f := range flags {
|
||||||
//TODO remove in v2 when errorableFlag is removed
|
//TODO remove in v2 when errorableFlag is removed
|
||||||
if f, ok := f.(errorableFlag); ok {
|
if ef, ok := f.(errorableFlag); ok {
|
||||||
if err := f.applyWithError(set); err != nil {
|
if err := ef.applyWithError(set); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user