goini icon indicating copy to clipboard operation
goini copied to clipboard

Dots ini notation

Open fabriziogiordano opened this issue 11 years ago • 1 comments

Is it possible to add a dots ini notation? An example is easier to explain:

[Production]
ftp.host = "http://...."
ftp.port = 21
ftp.user = "mario"
db.host  = "mysql://...."
db.port  = 3660
db.user  = "mario"

fabriziogiordano avatar Jan 29 '14 20:01 fabriziogiordano

@fabriziogiordano I think you can refactor this one into this:

  • a production ini file
  • ftp and db section in production ini file
  • put host, port and user configuration key under ftp section and put host, port and user under db section.

production.ini

[ftp]
host = "http://...."
port = 21
user = "mario"

[db]
host = "mysql://...."
port = 3660
user = "mario"

This will make your configuration more clear and more feasible. :)

andyxning avatar Feb 02 '16 05:02 andyxning