We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: v11.1.0
The default values for attributes within an array of objects are not being applied as expected.
envDefault
env.Parse
type TestMetricsOTLP struct { RouterRuntime bool `yaml:"router_runtime" envDefault:"true" env:"METRICS_OTLP_ROUTER_RUNTIME"` Exporters []TestMetricsOTLPExporter `yaml:"exporters"` } type TestMetricsOTLPExporter struct { Value string `yaml:"value"` Exporter string `yaml:"exporter" envDefault:"http"` Temporality string `yaml:"temporality" envDefault:"cumulative"` } func Parse() { config := TestMetricsOTLP{ Exporters: []TestMetricsOTLPExporter{ {Value: "A"}, }, } err := env.Parse(&config) if err != nil { fmt.Printf("Failed to parse: %v", err) } } func main() { Parse() }
The envDefault values for Temporality and Exporter should be applied.
Both Temporality and Exporter are equal to "".
Would a pull request for the fix be accepted?
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version: v11.1.0
The default values for attributes within an array of objects are not being applied as expected.
Reproduction Steps
envDefault
tag.env.Parse
.Expected Behavior
The envDefault values for Temporality and Exporter should be applied.
Actual Behavior
Both Temporality and Exporter are equal to "".
Would a pull request for the fix be accepted?
Thanks
The text was updated successfully, but these errors were encountered: