feat: only error on non required values
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-07-23 11:12:27 +02:00
parent a525f93093
commit eaf71fe65b

View File

@@ -94,7 +94,7 @@ OUTER:
}
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))
continue OUTER
}