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

Method MergeConfigMap

viper.go:1602–1609  ·  view source on GitHub ↗
(cfg map[string]any)

Source from the content-addressed store, hash-verified

1600func MergeConfigMap(cfg map[string]any) error { return v.MergeConfigMap(cfg) }
1601
1602func (v *Viper) MergeConfigMap(cfg map[string]any) error {
1603 if v.config == nil {
1604 v.config = make(map[string]any)
1605 }
1606 insensitiviseMap(cfg)
1607 mergeMaps(cfg, v.config, nil)
1608 return nil
1609}
1610
1611// WriteConfig writes the current configuration to a file.
1612func WriteConfig() error { return v.WriteConfig() }

Callers 3

MergeConfigMethod · 0.95
TestMergeConfigMapFunction · 0.80
MergeConfigMapFunction · 0.80

Calls 2

insensitiviseMapFunction · 0.85
mergeMapsFunction · 0.85

Tested by 1

TestMergeConfigMapFunction · 0.64