(key string)
| 1465 | func InConfig(key string) bool { return v.InConfig(key) } |
| 1466 | |
| 1467 | func (v *Viper) InConfig(key string) bool { |
| 1468 | lcaseKey := strings.ToLower(key) |
| 1469 | |
| 1470 | // if the requested key is an alias, then return the proper key |
| 1471 | lcaseKey = v.realKey(lcaseKey) |
| 1472 | path := strings.Split(lcaseKey, v.keyDelim) |
| 1473 | |
| 1474 | return v.searchIndexableWithPathPrefixes(v.config, path) != nil |
| 1475 | } |
| 1476 | |
| 1477 | // SetDefault sets the default value for this key. |
| 1478 | // SetDefault is case-insensitive for a key. |