MCPcopy Index your code
hub / github.com/coder/coder / ResolvePaths

Function ResolvePaths

agent/agentcontextconfig/resolve.go:43–55  ·  view source on GitHub ↗

ResolvePaths splits a comma-separated list of paths and resolves each entry independently. Empty entries and entries that resolve to empty strings are skipped.

(raw, baseDir string)

Source from the content-addressed store, hash-verified

41// resolves each entry independently. Empty entries and entries
42// that resolve to empty strings are skipped.
43func ResolvePaths(raw, baseDir string) []string {
44 if strings.TrimSpace(raw) == "" {
45 return nil
46 }
47 parts := strings.Split(raw, ",")
48 out := make([]string, 0, len(parts))
49 for _, p := range parts {
50 if resolved := ResolvePath(p, baseDir); resolved != "" {
51 out = append(out, resolved)
52 }
53 }
54 return out
55}

Callers 3

TestResolvePathsFunction · 0.92
ResolveFunction · 0.85
ContextPartsFromDirFunction · 0.85

Calls 1

ResolvePathFunction · 0.85

Tested by 1

TestResolvePathsFunction · 0.74