continue filling if tag not found

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-04-01 10:56:47 +03:00
parent 82243e323c
commit 7c0fcda07a

2
env.go
View File

@ -223,7 +223,7 @@ func (c *envConfig) fillValues(ctx context.Context, valueOf reflect.Value) error
} }
tag, ok := field.Tag.Lookup(c.opts.StructTag) tag, ok := field.Tag.Lookup(c.opts.StructTag)
if !ok { if !ok {
return nil continue
} }
val, ok := os.LookupEnv(tag) val, ok := os.LookupEnv(tag)
if !ok { if !ok {