-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Not exactly an issue, more of a feature request.
In the usage example on the main page you've got:
## config file
[default]
host = something.com
port = 443
active = true
compression = off
[service-1]
compression = on
[service-2]
port = 444
## go program
c, err := conf.ReadConfigFile("something.config")
c.GetBool("default", "compression") // returns false
c.GetBool("service-1", "compression") // returns true
c.GetBool("service-2", "compression") // returns GetError
###
I don't think there's really a point in knowing if a setting comes from the
default section or not so IMHO it would be nicer if c.GetBool("service-2",
"compression") returned the relevant setting from the "default" section - it
feels like it would make the code based on this package more elegant.
Original issue reported on code.google.com by [email protected] on 27 Jun 2010 at 12:15