The mission of this PR is to generalize the tree rendering logic we've used in wolfictl scan, wolfictl sbom, and other consumers of this code, so that we have a central way to render these trees, and can adjust aspects of rendering as needed for future enhancements.
The updated tree rendering implementation is now used by wolfictl scan. (Later we'll also use this for wolfictl sbom.) But the old tree rendering is left in place since it is exported and used elsewhere. It will be removed in a follow-up PR.
A guiding principle is that we don't want to export logic directly from the cli package. But the cli/components package is more appropriate for exporting and reuse.
The mission of this PR is to generalize the tree rendering logic we've used in
wolfictl scan
,wolfictl sbom
, and other consumers of this code, so that we have a central way to render these trees, and can adjust aspects of rendering as needed for future enhancements.The updated tree rendering implementation is now used by
wolfictl scan
. (Later we'll also use this forwolfictl sbom
.) But the old tree rendering is left in place since it is exported and used elsewhere. It will be removed in a follow-up PR.A guiding principle is that we don't want to export logic directly from the
cli
package. But thecli/components
package is more appropriate for exporting and reuse.