Skip to content

Commit

Permalink
[chore] remove use of confmap.WithErrorUnused (#31104)
Browse files Browse the repository at this point in the history
**Description:** 
remove use of confmap.WithErrorUnused

See
open-telemetry/opentelemetry-collector#9484
  • Loading branch information
atoulme committed Feb 7, 2024
1 parent ce67d73 commit d922b66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion receiver/receivercreator/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func mergeTemplatedAndDiscoveredConfigs(factory rcvr.Factory, templated, discove
endpointConfig := confmap.NewFromStringMap(map[string]any{
endpointConfigKey: targetEndpoint,
})
if err := endpointConfig.Unmarshal(factory.CreateDefaultConfig(), confmap.WithErrorUnused()); err != nil {
if err := endpointConfig.Unmarshal(factory.CreateDefaultConfig()); err != nil {
// rather than attach to error content that can change over time,
// confirm the error only arises w/ ErrorUnused mapstructure setting ("invalid keys")
if err = endpointConfig.Unmarshal(factory.CreateDefaultConfig(), confmap.WithIgnoreUnused()); err == nil {
Expand Down

0 comments on commit d922b66

Please sign in to comment.