Commit 94cba144 authored by Kirill Unitsaev's avatar Kirill Unitsaev

ui: add RenderTreeItems function

parent fc3e7665
...@@ -24,3 +24,17 @@ func RenderTreeLines(title string, lines []string) { ...@@ -24,3 +24,17 @@ func RenderTreeLines(title string, lines []string) {
Color: false, Color: false,
}) })
} }
func RenderTreeItems(title string, items []TreeItem) {
if len(items) == 0 {
return
}
color.Blue("%s", title)
RenderTree(RenderTreeOptions{
Items: items,
Style: DefaultTreeStyle,
Color: true,
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment