tini
tini copied to clipboard
Support for key, value pairs without a section?
As described in this wiki article: https://en.wikipedia.org/wiki/INI_file#Sections
Keys may, but need not, be grouped into arbitrarily named sections
I want to create an ini file that resembles something like this:
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = *.github.com
Notice that the first set of key, value pairs do not belong to any section.
Using tini for creating this type of ini results in the following:
[]
authorityKeyIdentifier = keyid,issuer
basicConstraints = CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = *.github.com
Is there a way to tell it to not create the empty [] section?
This feature is not supported.
Unfortunately, there is no time to update the API or implement 2.0
But you may add check for empty section here.
Ah, I see. Thanks for your quick response and for creating this crate. The API is intuitive and the docs are pretty good when compared to similar libraries. I hope you get some time to work on 2.0.
Thank you!