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

Feat: Autogenerated config sample from config golang struct #541

Open
deryrahman opened this issue Aug 26, 2022 · 0 comments
Open

Feat: Autogenerated config sample from config golang struct #541

deryrahman opened this issue Aug 26, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@deryrahman
Copy link
Member

deryrahman commented Aug 26, 2022

Is your feature request related to a problem? Please describe.
Sometimes whenever the changes in the structure of optimus configuration (./config/config.go) happens, contributors are sometimes usually forget to update the docs.

To get a better maintainability and consistency, we should rely on the code as a single source of truth. Hence, docs should be updated the sample config automatically whenever the config's structure in the source code is changed.

Describe the solution you'd like
Using 3rd party library. I haven't found yet the golang lib that suitable for this purpose. But, there's a library (gojson) which can convert sample yaml to golang struct. What we need is the inverse version of gojson.

Describe alternatives you've considered
Adding new lib to convert from golang struct to sample config yaml. Introduce this lib on odpf ecosystem through odpf/salt

Additional context
N/A

@deryrahman deryrahman added the enhancement New feature or request label Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant