MCPcopy Index your code
hub / github.com/cli/cli / renderFileTree

Function renderFileTree

pkg/cmd/skills/preview/preview.go:494–497  ·  view source on GitHub ↗

renderFileTree prints a tree of skill files using box-drawing characters.

(w io.Writer, cs *iostreams.ColorScheme, files []discovery.SkillFile)

Source from the content-addressed store, hash-verified

492
493// renderFileTree prints a tree of skill files using box-drawing characters.
494func renderFileTree(w io.Writer, cs *iostreams.ColorScheme, files []discovery.SkillFile) {
495 root := buildTree(files)
496 printTree(w, cs, root.children, "")
497}
498
499// buildTree constructs a tree structure from flat file paths.
500func buildTree(files []discovery.SkillFile) *treeNode {

Callers 2

renderAllFilesFunction · 0.85
renderInteractiveFunction · 0.85

Calls 2

buildTreeFunction · 0.85
printTreeFunction · 0.85

Tested by

no test coverage detected