-
Notifications
You must be signed in to change notification settings - Fork 43
file_input add mapstructure support #25
file_input add mapstructure support #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. However, I would like to be very cautious with this change.
Before we can be confident that all unmarshaling is the same between previous yaml
and now mapstructure
, I believe we need to include some additional tests.
- We should have some "golden" config files, which are unmarshaled using both
yaml
andmapstructure
, to ensure that the resulting config is exactly the same. - Especially important, we need to ensure that custom types (those defined in
helper
package) are unmarshaled the same in both cases.
I have added another ticket here, which I will take myself: #33
@wph95 I have merged #40, which I believe establishes a reasonable pattern for ensuring consistency between |
np, will try it tomorrow, #40 look great |
add a custom JSONUnmarshalerHook, to make mapstructure use UnmarshalJSON fn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks excellent.
ref open-telemetry/opentelemetry-collector-contrib#2334
resolved #14