exporter-toolkit icon indicating copy to clipboard operation
exporter-toolkit copied to clipboard

omitempty for all struct fields

Open regnaio opened this issue 1 year ago • 0 comments

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"

regnaio avatar May 13 '24 05:05 regnaio