(key string)
| 120 | } |
| 121 | |
| 122 | func IsValidKey(key string) bool { |
| 123 | // Deliberate reach-out to the global viper instance here. |
| 124 | // A key is valid if the global viper knows about it; our 'newViper' doesn't know about anything |
| 125 | validKeys := viper.AllKeys() |
| 126 | |
| 127 | key = strings.TrimSpace(key) |
| 128 | key = strings.ToLower(key) |
| 129 | return util.SliceContains(validKeys, key) |
| 130 | } |
no test coverage detected