MCPcopy
hub / github.com/cortexlabs/cortex / existingCachedClusterConfigPaths

Function existingCachedClusterConfigPaths

cli/cmd/lib_cluster_config.go:47–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47func existingCachedClusterConfigPaths() []string {
48 paths, err := files.ListDir(_localDir, false)
49 if err != nil {
50 return nil
51 }
52
53 var matches []string
54 for _, p := range paths {
55 if _cachedClusterConfigRegex.MatchString(path.Base(p)) {
56 matches = append(matches, p)
57 }
58 }
59
60 return matches
61}
62
63func readCachedClusterConfigFile(clusterConfig *clusterconfig.Config, filePath string) error {
64 errs := cr.ParseYAMLFile(clusterConfig, clusterconfig.FullConfigValidation, filePath)

Callers 1

Calls 1

ListDirFunction · 0.92

Tested by

no test coverage detected