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

Generate config samples #416

Open
ondrej-fabry opened this issue Nov 21, 2019 · 0 comments
Open

Generate config samples #416

ondrej-fabry opened this issue Nov 21, 2019 · 0 comments

Comments

@ondrej-fabry
Copy link
Member

All of the config samples (*.conf files) that we currently have were written mostly by hand. And it's very likely that most of them are probably quite out of date. It is definitely little insane to continue updating config samples manually.

This issue was created to track progress of solving this by automating and unifying generation of config sample files. Any problems related to config samples that have occurred in the past should be first resolved. For example, there has been few cases, when field name in the config sample had a typo (- vs. _), thus being unrecognized and ignored during parsing.

Following points should be addressed:

  • field names, default values and comments should be extracted from the config struct
  • structs used for config definitions should be taken as the only source of information and should be used as input for generation
  • go:generate directives could be used together with marking Config struct so it can be recognized by generation tool (similarily to Stringer tool)
  • ?

Open for discusssion..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant