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

Function readConfigFileFS

pkg/wconfig/settingsconfig.go:554–561  ·  view source on GitHub ↗
(fsys fs.FS, logPrefix string, fileName string)

Source from the content-addressed store, hash-verified

552}
553
554func readConfigFileFS(fsys fs.FS, logPrefix string, fileName string) (waveobj.MetaMapType, []ConfigError) {
555 barr, readErr := fs.ReadFile(fsys, fileName)
556 if readErr != nil {
557 // If we get an error, we may be using the wrong path separator for the given FS interface. Try switching the separator.
558 barr, readErr = fs.ReadFile(fsys, filepath.ToSlash(fileName))
559 }
560 return readConfigHelper(logPrefix+fileName, barr, readErr)
561}
562
563func ReadDefaultsConfigFile(fileName string) (waveobj.MetaMapType, []ConfigError) {
564 return readConfigFileFS(defaultconfig.ConfigFS, "defaults:", fileName)

Callers 4

ReadDefaultsConfigFileFunction · 0.85
ReadWaveHomeConfigFileFunction · 0.85
readConfigFilesForDirFunction · 0.85
readConfigPartForFSFunction · 0.85

Calls 2

readConfigHelperFunction · 0.85
ReadFileMethod · 0.80

Tested by

no test coverage detected