BurntSushi / toml

TOML parser for Golang with reflection.
MIT License
4.59k stars 529 forks source link

Short format of structures naming #428

Closed gitchander closed 3 weeks ago

gitchander commented 3 weeks ago

In my config I have next part:

...
[log-config]
   log-level = "debug"
      [log-config.writer-config]
         [log-config.writer-config.file-config]
            compress = true
...

Name for struct "file-config" is too large [log-config.writer-config.file-config]. Is there possible to make shortest name without all includes (like [file-config]) ?

arp242 commented 3 weeks ago

Is there possible to make shortest name without all includes (like [file-config]) ?

No, the TOML file format doesn't support that. You should probably use less nesting if you find it inconvenient.

The repo to discuss the TOML file format is at https://github.com/toml-lang/toml by the way. This has been discussed a few times, and people generally agreed to not change things.