Giter Site home page Giter Site logo

Why toml? about tegola HOT 7 OPEN

wroge avatar wroge commented on July 19, 2024
Why toml?

from tegola.

Comments (7)

wroge avatar wroge commented on July 19, 2024

If I convert to yaml, I don't have this problem (so its a json thing). But the general question remains...

from tegola.

ARolek avatar ARolek commented on July 19, 2024

@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?

from tegola.

wroge avatar wroge commented on July 19, 2024

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.

from tegola.

wroge avatar wroge commented on July 19, 2024

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 😩

from tegola.

ARolek avatar ARolek commented on July 19, 2024

@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.

from tegola.

jchamberlain avatar jchamberlain commented on July 19, 2024

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).

from tegola.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.