Added support for .ini files (iniparser). (0.34.0)
This commit is contained in:
parent
49261b96c2
commit
fb5670a699
18 changed files with 710 additions and 5 deletions
32
examples/data/complex.ini
Normal file
32
examples/data/complex.ini
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
[app]
|
||||
name = "FunApp"
|
||||
version = "1.2.3"
|
||||
debug = "true"
|
||||
|
||||
|
||||
[database]
|
||||
host = "localhost"
|
||||
port = "5432"
|
||||
user = "fun"
|
||||
pass = "secret"
|
||||
pool_size = "8"
|
||||
timeout = "2.5"
|
||||
|
||||
|
||||
[network]
|
||||
ssl = "yes"
|
||||
retries = "3"
|
||||
base_url = "https://api.example.com"
|
||||
|
||||
|
||||
[features]
|
||||
feature_x = "on"
|
||||
feature_y = "off"
|
||||
|
||||
|
||||
[paths]
|
||||
data_dir = "./data"
|
||||
log_file = "./logs/app.log"
|
||||
|
||||
|
||||
25
examples/data/subsections.ini
Normal file
25
examples/data/subsections.ini
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# INI with subsection-style headers for iniparser 4.2.6
|
||||
|
||||
[server]
|
||||
host = example.org
|
||||
port = 8080
|
||||
|
||||
[server.tls]
|
||||
enabled = true
|
||||
version = 1.3
|
||||
ciphers = TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256
|
||||
|
||||
[users.admin]
|
||||
name = alice
|
||||
active = yes
|
||||
quota_gb = 100
|
||||
|
||||
[users.guest]
|
||||
name = bob
|
||||
active = no
|
||||
quota_gb = 5
|
||||
|
||||
[paths.logs]
|
||||
dir = ./var/log/fun
|
||||
rotate = true
|
||||
max_files = 7
|
||||
Loading…
Add table
Add a link
Reference in a new issue