MCPcopy
hub / github.com/wavetermdev/waveterm / readConfigPartForFS

Function readConfigPartForFS

pkg/wconfig/settingsconfig.go:651–658  ·  view source on GitHub ↗

Read and merge all files in the specified config filesystem matching the patterns ` .json` and ` /*.json`

(fsys fs.FS, logPrefix string, partName string, simpleMerge bool)

Source from the content-addressed store, hash-verified

649
650// Read and merge all files in the specified config filesystem matching the patterns `<partName>.json` and `<partName>/*.json`
651func readConfigPartForFS(fsys fs.FS, logPrefix string, partName string, simpleMerge bool) (waveobj.MetaMapType, []ConfigError) {
652 config, errs := readConfigFilesForDir(fsys, logPrefix, partName, "", simpleMerge)
653 allErrs := errs
654 rtn := config
655 config, errs = readConfigFileFS(fsys, logPrefix, partName+".json")
656 allErrs = append(allErrs, errs...)
657 return mergeMetaMap(rtn, config, simpleMerge), allErrs
658}
659
660// Combine files from the defaults and home directory for the specified config part name
661func readConfigPart(partName string, simpleMerge bool) (waveobj.MetaMapType, []ConfigError) {

Callers 1

readConfigPartFunction · 0.85

Calls 3

readConfigFilesForDirFunction · 0.85
readConfigFileFSFunction · 0.85
mergeMetaMapFunction · 0.85

Tested by

no test coverage detected