Skip to content

Commit

Permalink
fix: remove untested behavior
Browse files Browse the repository at this point in the history
refs #240

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Feb 7, 2023
1 parent b135bbd commit e5472ec
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions env.go
Expand Up @@ -221,11 +221,7 @@ func doParseField(refField reflect.Value, refTypeField reflect.StructField, func
return nil
}
if reflect.Ptr == refField.Kind() && !refField.IsNil() {
if refField.Elem().Kind() == reflect.Struct {
return ParseWithFuncs(refField.Interface(), funcMap, optsWithPrefix(refTypeField, opts)...)
}

return ParseWithFuncs(refField.Interface(), funcMap, opts...)
return ParseWithFuncs(refField.Interface(), funcMap, optsWithPrefix(refTypeField, opts)...)
}
if reflect.Struct == refField.Kind() && refField.CanAddr() && refField.Type().Name() == "" {
return ParseWithFuncs(refField.Addr().Interface(), funcMap, optsWithPrefix(refTypeField, opts)...)
Expand Down

0 comments on commit e5472ec

Please sign in to comment.