package
4.3.0+incompatible
Repository: https://github.com/static-flow/go-pretty.git
Documentation: pkg.go.dev

# README

List

GoDoc

Pretty-print lists with multiple levels/indents into ASCII/Unicode strings.

  • Append Items one-by-one or as a group
  • Indent/UnIndent as you like
  • Support Items with Multiple-lines
  • Mirror output to an io.Writer object (like os.StdOut)
  • Completely customizable styles
  • Render as:
    • (ASCII/Unicode) List
    • HTML List (with custom CSS Class)
    • Markdown List
 ■ Game Of Thrones
   ■ Winter
   ■ Is
   ■ Coming
     ■ This
     ■ Is
     ■ Known
 ■ The Dark Tower
   ■ The Gunslinger

A demonstration of all the capabilities can be found here: ../cmd/demo-list

# Functions

NewWriter initializes and returns a Writer.

# Constants

DefaultHTMLCSSClass stores the css-class to use when none-provided via SetHTMLCSSClass(cssClass string).

# Variables

StyleBulletCircle renders a List like below: ● Game Of Thrones ● Winter ● Is ● Coming ● This ● Is ● Known ● The Dark Tower ● The Gunslinger.
StyleBulletFlower renders a List like below: ✽ Game Of Thrones ✽ Winter ✽ Is ✽ Coming ✽ This ✽ Is ✽ Known ✽ The Dark Tower ✽ The Gunslinger.
StyleBulletSquare renders a List like below: ■ Game Of Thrones ■ Winter ■ Is ■ Coming ■ This ■ Is ■ Known ■ The Dark Tower ■ The Gunslinger.
StyleBulletStar renders a List like below: ★ Game Of Thrones ★ Winter ★ Is ★ Coming ★ This ★ Is ★ Known ★ The Dark Tower ★ The Gunslinger.
StyleBulletTriangle renders a List like below: ▶ Game Of Thrones ▶ Winter ▶ Is ▶ Coming ▶ This ▶ Is ▶ Known ▶ The Dark Tower ▶ The Gunslinger.
StyleConnectedBold renders a List like below: ┏━ Game Of Thrones ┃ ┣━ Winter ┃ ┣━ Is ┃ ┗━ Coming ┃ ┣━ This ┃ ┣━ Is ┃ ┗━ Known ┗━ The Dark Tower ┗━ The Gunslinger.
StyleConnectedDouble renders a List like below: ╔═ Game Of Thrones ║ ╠═ Winter ║ ╠═ Is ║ ╚═ Coming ║ ╠═ This ║ ╠═ Is ║ ╚═ Known ╚═ The Dark Tower ╚═ The Gunslinger.
StyleConnectedLight renders a List like below: ┌─ Game Of Thrones │ ├─ Winter │ ├─ Is │ └─ Coming │ ├─ This │ ├─ Is │ └─ Known └─ The Dark Tower └─ The Gunslinger.
StyleConnectedRounded renders a List like below: ╭─ Game Of Thrones │ ├─ Winter │ ├─ Is │ ╰─ Coming │ ├─ This │ ├─ Is │ ╰─ Known ╰─ The Dark Tower ╰─ The Gunslinger.
StyleDefault renders a List like below: * Game Of Thrones * Winter * Is * Coming * This * Is * Known * The Dark Tower * The Gunslinger.
StyleMarkdown renders a List like below: * Game Of Thrones * Winter * Is * Coming * This * Is * Known * The Dark Tower * The Gunslinger.

# Structs

List helps print a 2-dimensional array in a human readable pretty-List.
Style declares how to render the List (items).

# Interfaces

Writer declares the interfaces that can be used to setup and render a list.