Skip to content

omitempty for all struct fields #222

@regnaio

Description

@regnaio

All fields , (e.g. in Config, TLSConfig) should have yaml:"<NAME>,omitempty"

https://github.com/prometheus/exporter-toolkit/blob/master/web/tls_config.go#L39

For example, it doesn't make sense that TLSConfig.MinVersion appears as 0 when marshaled to YAML. Prometheus crashes if you try to use this web config via --web.config.file=:

caller=main.go:949 level=error msg="Unable to validate web configuration file" err="unknown TLS version: 0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions