Skip to content

Commit

Permalink
docs(godoc): add overview
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbunni committed May 15, 2024
1 parent 2889c21 commit d9dfac2
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
18 changes: 18 additions & 0 deletions list/list.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
// Package list provides an API to create printable list structures that can be
// included in any command line application. This package includes full support
// for nested lists. Here's how you do it:
//
// l := list.New(
// "A",
// "B",
// "C",
// list.New(
// "D",
// "E",
// "F",
// ).Enumerator(list.Roman),
// )
// fmt.Println(l)
//
// The list package provides built-in enumerator styles to help glamourize your
// lists. Lists are fully customizable, so let your creativity flow.
package list

import (
Expand Down
24 changes: 24 additions & 0 deletions tree/tree.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
// Package tree provides an API to create printable tree-like structures that
// can be included in any command line application. It goes something like:
//
// 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"),
// )
//
// 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 d9dfac2

Please sign in to comment.