MCPcopy Create free account
hub / github.com/driangle/taskmd / loadScopePathsConfig

Function loadScopePathsConfig

apps/cli/internal/cli/scope_config.go:10–28  ·  view source on GitHub ↗

loadScopePathsConfig reads scope definitions from .taskmd.yaml and returns a ScopeMap.

()

Source from the content-addressed store, hash-verified

8
9// loadScopePathsConfig reads scope definitions from .taskmd.yaml and returns a ScopeMap.
10func loadScopePathsConfig() taskcontext.ScopeMap {
11 raw := viper.Get("scopes")
12 if raw == nil {
13 return nil
14 }
15 scopeMap, ok := raw.(map[string]any)
16 if !ok {
17 return nil
18 }
19
20 entries := parseScopeEntries(scopeMap)
21 result := make(taskcontext.ScopeMap, len(entries))
22 for name, sc := range entries {
23 if len(sc.Paths) > 0 {
24 result[name] = sc.Paths
25 }
26 }
27 return result
28}

Callers 2

runContextFunction · 0.85
runGetFunction · 0.85

Calls 1

parseScopeEntriesFunction · 0.85

Tested by

no test coverage detected