// Bool returns the boolean value for a given key. func (c *ConfigContainer) Bool(key string) (bool, error) { v, err := c.getData(key) if err != nil { return false, err } return config.ParseBool(v) }
// Bool returns the boolean value for a given key. func (c *ConfigContainer) Bool(key string) (bool, error) { if v := c.data[key]; v != nil { return config.ParseBool(v) } return false, fmt.Errorf("not exist key: %q", key) }