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

Any recommendation for configuration management package? #85

Open
hdw868 opened this issue Sep 15, 2021 · 4 comments
Open

Any recommendation for configuration management package? #85

hdw868 opened this issue Sep 15, 2021 · 4 comments

Comments

@hdw868
Copy link

hdw868 commented Sep 15, 2021

There could be a lot of approach to store your configuration to some file such as JSON, YAML, TOML, INI and etc. I wonder what's the proposed way to read/write configuration file in golang?

@ngopher
Copy link

ngopher commented Sep 16, 2021

@hdw868 Please provide some more explanation.

@hdw868
Copy link
Author

hdw868 commented Sep 17, 2021

@hdw868 Please provide some more explanation.

I edit my description : )

@mofodox
Copy link

mofodox commented Oct 28, 2021

There could be a lot of approach to store your configuration to some file such as JSON, YAML, TOML, INI and etc. I wonder what's the proposed way to read/write configuration file in golang?

@hdw868 Well you can use the built-in os package to read and write files.

@kunapyanov
Copy link

Viper is good choice if you want some complicated logic and wanna keep it easier to handle. Like JSON(YAML) + env variables. But it could be overwhelmed if you have just a few variables, then os(to read) and any package to parse json or yaml or whatever you want would be enough. That is my view :)
Also take a look at this list of packages

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

4 participants