MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / Flatten

Function Flatten

internal/editorconfig/keypath.go:120–124  ·  view source on GitHub ↗

Flatten returns data as a map of dotted key paths to stringified values, prefixed with prefix. Slices are flattened by index.

(data map[string]any, prefix string)

Source from the content-addressed store, hash-verified

118// Flatten returns data as a map of dotted key paths to stringified values,
119// prefixed with prefix. Slices are flattened by index.
120func Flatten(data map[string]any, prefix string) map[string]string {
121 out := map[string]string{}
122 flattenInto(data, prefix, out)
123 return out
124}
125
126func flattenInto(value any, prefix string, out map[string]string) {
127 switch typed := value.(type) {

Callers 2

TestFlattenFunction · 0.92
showEditorConfigFunction · 0.92

Calls 1

flattenIntoFunction · 0.85

Tested by 1

TestFlattenFunction · 0.74