Skip to content

Commit

Permalink
refactor: package comment
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed May 30, 2024
1 parent ec22a06 commit 7aafa50
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions tree/tree.go
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
// Package tree provides an API to create printable tree-like structures that
// can be included in any command line application. It goes something like:
// Package tree allows you to build trees, as simple or complicated as you need.
//
// Define a tree with a root node, and children, set rendering properties (such
// as style, enumerators, etc...), and print it.
//
// t := tree.New().
// Root(".").
// Item("Item 1").
// Item(
// tree.New().Root("Item 2").
// Item("Item 2.1").
// Item("Item 2.2").
// Item("Item 2.3"),
// ).
// Item(
// tree.New().
// Root("Item 3").
// Item("Item 3.1").
// Item("Item 3.2"),
// Items(
// ".git",
// tree.New().
// Root("examples/").
// Items(
// tree.New().
// Root("list/").
// Items("main.go").
// tree.New().
// Root("table/").
// Items("main.go").
// ).
// tree.New().
// Root("list/").
// Items("list.go", "list_test.go").
// tree.New().
// Root("table/").
// Items("table.go", "table_test.go").
// "align.go",
// "align_test.go",
// "join.go",
// "join_test.go",
// )
//
// fmt.Println(t)
//
// If you're looking to create a list, you can use the list package which wraps
// the tree package with bulleted enumerations. Trees are fully customizable, so
// don't be shy, give 'em the 'ol razzle dazzle.
package tree

import (
Expand Down

0 comments on commit 7aafa50

Please sign in to comment.