feat: only error on non required values
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -94,7 +94,7 @@ OUTER:
|
|||||||
}
|
}
|
||||||
|
|
||||||
valueStr, err := defaultLogger.Load().Get(ctx, tag.Env)
|
valueStr, err := defaultLogger.Load().Get(ctx, tag.Env)
|
||||||
if err != nil {
|
if err != nil && tag.Required {
|
||||||
errs = append(errs, fmt.Errorf("field: %s failed to load: %w", field.Name, err))
|
errs = append(errs, fmt.Errorf("field: %s failed to load: %w", field.Name, err))
|
||||||
continue OUTER
|
continue OUTER
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user