MCPcopy Create free account
hub / github.com/diillson/chatcli / splitDocsFlattenCSV

Function splitDocsFlattenCSV

cli/plugins/builtin_docsflatten.go:466–479  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

464}
465
466func splitDocsFlattenCSV(s string) []string {
467 if strings.TrimSpace(s) == "" {
468 return nil
469 }
470 parts := strings.Split(s, ",")
471 out := make([]string, 0, len(parts))
472 for _, p := range parts {
473 p = trimQuotes(strings.TrimSpace(p))
474 if p != "" {
475 out = append(out, filepath.ToSlash(p))
476 }
477 }
478 return out
479}
480
481// isLikelyGitURL gates what we hand to `git clone`. Rejecting flag-like and
482// local-path-like values keeps the subprocess invocation unambiguous.

Callers 1

parseDocsFlattenArgsFunction · 0.85

Calls 1

trimQuotesFunction · 0.85

Tested by

no test coverage detected