Combine files from the defaults and home directory for the specified config part name
(partName string, simpleMerge bool)
| 659 | |
| 660 | // Combine files from the defaults and home directory for the specified config part name |
| 661 | func readConfigPart(partName string, simpleMerge bool) (waveobj.MetaMapType, []ConfigError) { |
| 662 | configDirAbsPath := wavebase.GetWaveConfigDir() |
| 663 | configDirFsys := os.DirFS(configDirAbsPath) |
| 664 | defaultConfigs, cerrs := readConfigPartForFS(defaultconfig.ConfigFS, "defaults:", partName, simpleMerge) |
| 665 | homeConfigs, cerrs1 := readConfigPartForFS(configDirFsys, "", partName, simpleMerge) |
| 666 | |
| 667 | rtn := defaultConfigs |
| 668 | allErrs := append(cerrs, cerrs1...) |
| 669 | return mergeMetaMap(rtn, homeConfigs, simpleMerge), allErrs |
| 670 | } |
| 671 | |
| 672 | // this function should only be called by the wconfig code. |
| 673 | // in golang code, the best way to get the current config is via the watcher -- wconfig.GetWatcher().GetFullConfig() |
no test coverage detected