cn-infra
cn-infra copied to clipboard
Generate config samples
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:generatedirectives could be used together with markingConfigstruct so it can be recognized by generation tool (similarily to Stringer tool) - ?
Open for discusssion..