Skip to content

Add omitempty to all appropriate config struct fields #12191

Open
@evan-bradley

Description

@evan-bradley

Is your feature request related to a problem? Please describe.

Right now when marshaling our config structs into YAML, they produce a large number of keys that are unset. We should get as close to only emitting fields that have been actually set as possible.

Describe the solution you'd like

Use mapstructure's omitempty suffix to omit these values from serialization.

Describe alternatives you've considered

We can add an option to confmap.Marshal that forces this regardless of whether it has been set on the struct. We may need this anyway, but it would be nice if our config structs handled this out-of-the-box.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions