Exemplo n.º 1
0
func (l *Loader) loadMapIntoValues(key config.Key, values *config.Values, object map[string]interface{}) {
	for keyPart, v := range object {
		if l.KeyPartTransform != nil {
			keyPart = l.KeyPartTransform(keyPart)
		}
		nextKey := key.AppendStrings(keyPart)
		if m, ok := v.(map[string]interface{}); ok {
			l.loadMapIntoValues(nextKey, values, m)
		} else {
			l.loadSingleIntoValues(nextKey, values, v)
		}
	}
}