-
-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Configuration: use YAML/JSON instead of INI #2521
Comments
maybe TOML? TOML will be more flexible:
|
TOML maybe not suitable for multiple levels configurations. It's redundant. We will support JSON and YAML first, it's widely used and easy to auto generate. And then, other format can also be supported if it can simple map file content to a golang struct. |
Is this planned in v1.0? |
@cloudwindy For compatibility reasons, this issue has been temporarily shelved. In the next major version, it will be directly supported, not v1, but v2. |
In the early stage of development, I choose INI as configure format because it looks simple and easy to write.
However, with the increase of project complexity, INI can't describe complex configures. It doesn't support hierarchical configuration. We use same prefix to represent arrays or maps. It's not an elegant way and difficult to unmarshal to a struct.
We want to use YAML and JSON to replace INI in a smooth way:
The text was updated successfully, but these errors were encountered: