Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omitempty for all struct fields #222

Open
regnaio opened this issue May 13, 2024 · 0 comments
Open

omitempty for all struct fields #222

regnaio opened this issue May 13, 2024 · 0 comments

Comments

@regnaio
Copy link

regnaio commented May 13, 2024

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant