(value reflect.Value, fieldName string)
| 992 | } |
| 993 | |
| 994 | func configMapNode(value reflect.Value, fieldName string) (any, bool) { |
| 995 | if value.IsNil() { |
| 996 | return map[string]any{}, true |
| 997 | } |
| 998 | result := make(map[string]any, value.Len()) |
| 999 | for _, key := range sortedReflectMapKeys(value) { |
| 1000 | mapKey := fmt.Sprint(key.Interface()) |
| 1001 | if strings.EqualFold(fieldName, configEnvKey) || strings.EqualFold(fieldName, configSecretEnvKey) { |
| 1002 | result[mapKey] = aghconfig.RedactedValue() |
| 1003 | continue |
| 1004 | } |
| 1005 | node, hasValue := configNodeFromValue(value.MapIndex(key), "") |
| 1006 | if hasValue { |
| 1007 | result[mapKey] = node |
| 1008 | } |
| 1009 | } |
| 1010 | return result, true |
| 1011 | } |
| 1012 | |
| 1013 | func sortedReflectMapKeys(value reflect.Value) []reflect.Value { |
| 1014 | keys := value.MapKeys() |
no test coverage detected