-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Why toml? #958
Comments
If I convert to yaml, I don't have this problem (so its a json thing). But the general question remains... |
@wroge good question. We actually debated between JSON and TOML a bit early in the development of tegola and we opted for TOML as we expected config files to generally be authored by people instead of machines. TOML is easier to write by hand, and also supports comments which can be useful. YAML also has this capability, but TOML has less features than YAML so it's a bit more straight forward. Recently we have had a few people reach out discussing how they're auto generating configs for tegola so this use case is more common than we anticipated. That considered, tegola's config layer currently parses TOML into a config struct, and this could be extended to support other config formats like JSON / YAML. Would you be interested in tackling this? |
I will take a look at this. EDIT: It's not that easy because env.Dict is used. It would therefore only be possible after refactoring. |
An update to v1.3.2 would probably fix the Int-Float issue of he BurntSushi/toml package. But I dont dare to edit the modules.txt file 😩 |
@wroge want to give upgrading a try? If you clone the source code you can run the following from the repo root to upgrade: go get -u <path to package>
go mod vendor
go mod tidy You can then follow the build instructions. |
FYI, in my fork I've already updated Tegola to use JSON in addition to TOML and we're using it in production right now. My work has been focused on updating our other systems that talk to Tegola, but I'll be back to finishing up my Tegola PRs later this month (dynamic config, config-in-redis, JSON config). |
Any update on this? I have a use case where dynamic config would be very beneficial. |
Thanks for the good work, I really like tegola to create vector tiles.
But I don't understand why you use toml for configuration.
I have a large number of configurations, so I use external tools to validate and generate the configuration. Many tools don't understand toml so I have to convert to json and then to toml. This leads to the problem that float values are converted to int values and toml can't handle that.
Since tegola is written in go, it is very easy to accept other configuration formats such as json or yaml.
So the question is: why toml?
The text was updated successfully, but these errors were encountered: