MCPcopy Create free account
hub / github.com/cli/cli / renderFileTree

Function renderFileTree

pkg/cmd/skills/preview/preview.go:495–498  ·  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

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