config: fix default config loader

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-12-13 19:28:29 +03:00
parent 99738096ac
commit 06c3cd6637
2 changed files with 2 additions and 1 deletions

View File

@ -196,7 +196,7 @@ func (c *defaultConfig) fillValues(ctx context.Context, valueOf reflect.Value) e
}
tag, ok := field.Tag.Lookup(c.opts.StructTag)
if !ok {
return nil
continue
}
if err := c.fillValue(ctx, value, tag); err != nil {

View File

@ -11,6 +11,7 @@ import (
type Cfg struct {
StringValue string `default:"string_value"`
IntValue int `default:"99"`
IgnoreValue string `json:"-"`
StructValue struct {
StringValue string `default:"string_value"`
}