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

Function GetConfigSubdirs

pkg/wconfig/settingsconfig.go:707–728  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

705}
706
707func GetConfigSubdirs() []string {
708 var fullConfig FullConfigType
709 configRType := reflect.TypeOf(fullConfig)
710 var retVal []string
711 configDirAbsPath := wavebase.GetWaveConfigDir()
712 for fieldIdx := 0; fieldIdx < configRType.NumField(); fieldIdx++ {
713 field := configRType.Field(fieldIdx)
714 if field.PkgPath != "" {
715 continue
716 }
717 configFile := field.Tag.Get("configfile")
718 if configFile == "-" {
719 continue
720 }
721 jsonTag := utilfn.GetJsonTag(field)
722 if jsonTag != "-" && jsonTag != "" && jsonTag != "settings" {
723 retVal = append(retVal, filepath.Join(configDirAbsPath, jsonTag))
724 }
725 }
726 log.Printf("subdirs: %v\n", retVal)
727 return retVal
728}
729
730func getConfigKeyType(configKey string) reflect.Type {
731 ctype := reflect.TypeOf(SettingsType{})

Callers 1

GetWatcherFunction · 0.85

Calls 3

GetWaveConfigDirFunction · 0.92
GetJsonTagFunction · 0.92
GetMethod · 0.45

Tested by

no test coverage detected