MCPcopy
hub / github.com/spf13/viper / insensitiviseMap

Function insensitiviseMap

util.go:89–100  ·  view source on GitHub ↗
(m map[string]any)

Source from the content-addressed store, hash-verified

87}
88
89func insensitiviseMap(m map[string]any) {
90 for key, val := range m {
91 val = insensitiviseVal(val)
92 lower := strings.ToLower(key)
93 if key != lower {
94 // remove old key (not lower-cased)
95 delete(m, key)
96 }
97 // update map
98 m[lower] = val
99 }
100}
101
102func insensitiveArray(a []any) {
103 for i, val := range a {

Callers 3

MergeConfigMapMethod · 0.85
unmarshalReaderMethod · 0.85
insensitiviseValFunction · 0.85

Calls 1

insensitiviseValFunction · 0.85

Tested by

no test coverage detected