From 6dc4bf2d25fe14bd428f7ec79f5ab12f8dd845e2 Mon Sep 17 00:00:00 2001 From: Brooke Hatton Date: Fri, 18 Mar 2022 09:40:20 +0000 Subject: [PATCH] update docs --- docs/docs/printer/barchart.md | 34 ++++++++------- docs/docs/printer/basictext.md | 33 ++++++++------- docs/docs/printer/bigtext.md | 23 +++++----- docs/docs/printer/box.md | 71 ++++++++++++++++--------------- docs/docs/printer/bulletlist.md | 35 ++++++++------- docs/docs/printer/center.md | 32 +++++++------- docs/docs/printer/header.md | 40 +++++++++--------- docs/docs/printer/panel.md | 29 +++++++------ docs/docs/printer/paragraph.md | 35 +++++++-------- docs/docs/printer/prefix.md | 75 +++++++++++++++++---------------- docs/docs/printer/section.md | 37 ++++++++-------- docs/docs/printer/table.md | 47 +++++++++++---------- docs/docs/printer/tree.md | 35 +++++++-------- 13 files changed, 273 insertions(+), 253 deletions(-) diff --git a/docs/docs/printer/barchart.md b/docs/docs/printer/barchart.md index 0fe53a135..76c18de33 100644 --- a/docs/docs/printer/barchart.md +++ b/docs/docs/printer/barchart.md @@ -1,6 +1,6 @@ # BarChartPrinter - @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

(Show source of demo)

- ## Usage ### Basic usage @@ -47,17 +46,19 @@ bars := pterm.Bars{ > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[Bars](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Bars)|[Bars](https://pkg.go.dev/github.com/pterm/pterm#Bars)| -|[Horizontal](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Horizontal)|bool| -|[ShowValue](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.ShowValue)|bool| -|[Height](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Height)|int| -|[Width](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Width)|int| -|[VerticalBarCharacter](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.VerticalBarCharacter)|string| -|[HorizontalBarCharacter](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.HorizontalBarCharacter)|string| +| Option | Type | +| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| [Bars](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Bars) | [Bars](https://pkg.go.dev/github.com/pterm/pterm#Bars) | +| [Horizontal](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Horizontal) | bool | +| [ShowValue](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.ShowValue) | bool | +| [Height](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Height) | int | +| [Width](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.Width) | int | +| [VerticalBarCharacter](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.VerticalBarCharacter) | string | +| [HorizontalBarCharacter](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.HorizontalBarCharacter) | string | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#BarChartPrinter.WithWriter) | io.Writer | ### Output functions + ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md) diff --git a/docs/docs/printer/basictext.md b/docs/docs/printer/basictext.md index 67e02fc88..17d7c97aa 100644 --- a/docs/docs/printer/basictext.md +++ b/docs/docs/printer/basictext.md @@ -1,6 +1,6 @@ # BasicTextPrinter - @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

(Show source of demo)

- ## Usage ### Basic usage @@ -29,24 +28,26 @@ pterm.DefaultBasicText.Println("Hello, World!") > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[Style](https://pkg.go.dev/github.com/pterm/pterm#BasicTextPrinter.WithStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| +| Option | Type | +| ------------------------------------------------------------------------------- | ---------------------------------------------------------- | +| [Style](https://pkg.go.dev/github.com/pterm/pterm#BasicTextPrinter.WithStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#BasicTextPrinter.WithWriter) | io.Writer | ### Output functions > This printer implements the interface [`TextPrinter`](https://github.com/pterm/pterm/blob/master/interface_text_printer.go) -|Function|Description| -|------|---------| -|Sprint(a ...interface{})|Returns a string| -|Sprintln(a ...interface{})|Returns a string with a new line at the end| -|Sprintf(format string, a ...interface{})|Returns a string, formatted according to a format specifier| -|Sprintfln(format string, a ...interface{})|Returns a string, formatted according to a format specifier with a new line at the end| -|Print(a ...interface{})|Prints to the terminal| -|Println(a ...interface{})|Prints to the terminal with a new line at the end| -|Printf(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier| -|Printfln(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier with a new line at the end| +| Function | Description | +| ------------------------------------------ | -------------------------------------------------------------------------------------------- | +| Sprint(a ...interface{}) | Returns a string | +| Sprintln(a ...interface{}) | Returns a string with a new line at the end | +| Sprintf(format string, a ...interface{}) | Returns a string, formatted according to a format specifier | +| Sprintfln(format string, a ...interface{}) | Returns a string, formatted according to a format specifier with a new line at the end | +| Print(a ...interface{}) | Prints to the terminal | +| Println(a ...interface{}) | Prints to the terminal with a new line at the end | +| Printf(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier | +| Printfln(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier with a new line at the end | ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md) diff --git a/docs/docs/printer/bigtext.md b/docs/docs/printer/bigtext.md index a89fe3d0e..4bc3c708c 100644 --- a/docs/docs/printer/bigtext.md +++ b/docs/docs/printer/bigtext.md @@ -1,6 +1,6 @@ # BigTextPrinter - @@ -28,12 +28,14 @@ pterm.DefaultBigText.WithLetters(pterm.NewLettersFromString("Hello")).Render() > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[Letters](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithLetters)|[Letters](https://pkg.go.dev/github.com/pterm/pterm#Letters)| -|[BigCharacters](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithBigCharacters)|map[string]string| +| Option | Type | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | +| [Letters](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithLetters) | [Letters](https://pkg.go.dev/github.com/pterm/pterm#Letters) | +| [BigCharacters](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithBigCharacters) | map[string]string | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithWriter) | io.Writer | ### Output functions + ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md) diff --git a/docs/docs/printer/box.md b/docs/docs/printer/box.md index f44f73b7c..5d0149aec 100644 --- a/docs/docs/printer/box.md +++ b/docs/docs/printer/box.md @@ -1,6 +1,6 @@ # BoxPrinter - @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

(Show source of demo)

- ## Usage ### Basic usage @@ -29,43 +28,45 @@ pterm.DefaultBox.Println("test") > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[BottomLeftCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomLeftCornerString)|string| -|[BottomPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomPadding)|int| -|[BottomRightCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomRightCornerString)|string| -|[BoxStyle](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBoxStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[HorizontalString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithHorizontalString)|string| -|[LeftPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithLeftPadding)|int| -|[RightPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithRightPadding)|int| -|[Text](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithText)|string| -|[TextStyle](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTextStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[Title](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitle)|string| -|[TitleBottomCenter](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomCenter)|boolean| -|[TitleBottomLeft](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomLeft)|boolean| -|[TitleBottomRight](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomRight)|boolean| -|[TitleTopCenter](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopCenter)|boolean| -|[TitleTopLeft](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopLeft)|boolean| -|[TitleTopRight](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopRight)|boolean| -|[TopLeftCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopLeftCornerString)|string| -|[TopPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopPadding)|int| -|[TopRightCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopRightCornerString)|string| -|[VerticalString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithVerticalString)|string| +| Option | Type | +| ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | +| [BottomLeftCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomLeftCornerString) | string | +| [BottomPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomPadding) | int | +| [BottomRightCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBottomRightCornerString) | string | +| [BoxStyle](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithBoxStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [HorizontalString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithHorizontalString) | string | +| [LeftPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithLeftPadding) | int | +| [RightPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithRightPadding) | int | +| [Text](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithText) | string | +| [TextStyle](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTextStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Title](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitle) | string | +| [TitleBottomCenter](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomCenter) | boolean | +| [TitleBottomLeft](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomLeft) | boolean | +| [TitleBottomRight](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleBottomRight) | boolean | +| [TitleTopCenter](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopCenter) | boolean | +| [TitleTopLeft](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopLeft) | boolean | +| [TitleTopRight](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTitleTopRight) | boolean | +| [TopLeftCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopLeftCornerString) | string | +| [TopPadding](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopPadding) | int | +| [TopRightCornerString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithTopRightCornerString) | string | +| [VerticalString](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithVerticalString) | string | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter.WithWriter) | io.Writer | ### Output functions > This printer implements the interface [`TextPrinter`](https://github.com/pterm/pterm/blob/master/interface_text_printer.go) -|Function|Description| -|------|---------| -|Sprint(a ...interface{})|Returns a string| -|Sprintln(a ...interface{})|Returns a string with a new line at the end| -|Sprintf(format string, a ...interface{})|Returns a string, formatted according to a format specifier| -|Sprintfln(format string, a ...interface{})|Returns a string, formatted according to a format specifier with a new line at the end| -|Print(a ...interface{})|Prints to the terminal| -|Println(a ...interface{})|Prints to the terminal with a new line at the end| -|Printf(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier| -|Printfln(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier with a new line at the end| +| Function | Description | +| ------------------------------------------ | -------------------------------------------------------------------------------------------- | +| Sprint(a ...interface{}) | Returns a string | +| Sprintln(a ...interface{}) | Returns a string with a new line at the end | +| Sprintf(format string, a ...interface{}) | Returns a string, formatted according to a format specifier | +| Sprintfln(format string, a ...interface{}) | Returns a string, formatted according to a format specifier with a new line at the end | +| Print(a ...interface{}) | Prints to the terminal | +| Println(a ...interface{}) | Prints to the terminal with a new line at the end | +| Printf(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier | +| Printfln(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier with a new line at the end | ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md) diff --git a/docs/docs/printer/bulletlist.md b/docs/docs/printer/bulletlist.md index 9e680e7ef..ff89e5ca1 100644 --- a/docs/docs/printer/bulletlist.md +++ b/docs/docs/printer/bulletlist.md @@ -1,6 +1,6 @@ # BulletListPrinter - @@ -19,10 +19,10 @@ pterm.DefaultBulletList.WithItems([]pterm.BulletListItem{{Level: 0, Text: "Level ### Functions -|Function|Description| -|--------|-----------| -|[NewBulletListFromString(s string, padding string)](https://pkg.go.dev/github.com/pterm/pterm#TemplatePrinter.NewBulletListFromString)|NewBulletListFromString returns a BulletListPrinter with Text using the NewTreeListItemFromString method, splitting after return (\n).| -|[NewBulletListFromStrings(s []string, padding string)](https://pkg.go.dev/github.com/pterm/pterm#TemplatePrinter.NewBulletListFromStrings)|NewBulletListFromStrings returns a BulletListPrinter with Text using the NewTreeListItemFromString method.| +| Function | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | +| [NewBulletListFromString(s string, padding string)](https://pkg.go.dev/github.com/pterm/pterm#TemplatePrinter.NewBulletListFromString) | NewBulletListFromString returns a BulletListPrinter with Text using the NewTreeListItemFromString method, splitting after return (\n). | +| [NewBulletListFromStrings(s []string, padding string)](https://pkg.go.dev/github.com/pterm/pterm#TemplatePrinter.NewBulletListFromStrings) | NewBulletListFromStrings returns a BulletListPrinter with Text using the NewTreeListItemFromString method. | ### Options @@ -35,14 +35,16 @@ pterm.DefaultBulletList.WithItems([]pterm.BulletListItem{{Level: 0, Text: "Level > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[Items](https://pkg.go.dev/github.com/pterm/pterm#BulletListPrinter.WithItems)|[[]BulletListItem](https://pkg.go.dev/github.com/pterm/pterm#BulletListItem)| -|[TextStyle](https://pkg.go.dev/github.com/pterm/pterm#BulletListPrinter.WithTextStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[Bullet](https://pkg.go.dev/github.com/pterm/pterm#BulletListPrinter.WithBullet)|string| -|[BulletStyle](https://pkg.go.dev/github.com/pterm/pterm#BulletListPrinter.WithBulletStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| +| Option | Type | +| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | +| [Items](https://pkg.go.dev/github.com/pterm/pterm#BulletListPrinter.WithItems) | [[]BulletListItem](https://pkg.go.dev/github.com/pterm/pterm#BulletListItem) | +| [TextStyle](https://pkg.go.dev/github.com/pterm/pterm#BulletListPrinter.WithTextStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Bullet](https://pkg.go.dev/github.com/pterm/pterm#BulletListPrinter.WithBullet) | string | +| [BulletStyle](https://pkg.go.dev/github.com/pterm/pterm#BulletListPrinter.WithBulletStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#BulletListPrinter.WithWriter) | io.Writer | ### Output functions + ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md) diff --git a/docs/docs/printer/center.md b/docs/docs/printer/center.md index f806f79ed..695572e92 100644 --- a/docs/docs/printer/center.md +++ b/docs/docs/printer/center.md @@ -1,6 +1,6 @@ # CenterPrinter - @@ -28,24 +28,26 @@ pterm.DefaultCenter.Println("Hello,\nWorld!") > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[CenterEachLineSeparately](https://pkg.go.dev/github.com/pterm/pterm#CenterPrinter.WithCenterEachLineSeparately)|...bool| +| Option | Type | +| ---------------------------------------------------------------------------------------------------------------- | --------- | +| [CenterEachLineSeparately](https://pkg.go.dev/github.com/pterm/pterm#CenterPrinter.WithCenterEachLineSeparately) | ...bool | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#CenterPrinter.WithWriter) | io.Writer | ### Output functions > This printer implements the interface [`TextPrinter`](https://github.com/pterm/pterm/blob/master/interface_text_printer.go) -|Function|Description| -|------|---------| -|Sprint(a ...interface{})|Returns a string| -|Sprintln(a ...interface{})|Returns a string with a new line at the end| -|Sprintf(format string, a ...interface{})|Returns a string, formatted according to a format specifier| -|Sprintfln(format string, a ...interface{})|Returns a string, formatted according to a format specifier with a new line at the end| -|Print(a ...interface{})|Prints to the terminal| -|Println(a ...interface{})|Prints to the terminal with a new line at the end| -|Printf(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier| -|Printfln(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier with a new line at the end| +| Function | Description | +| ------------------------------------------ | -------------------------------------------------------------------------------------------- | +| Sprint(a ...interface{}) | Returns a string | +| Sprintln(a ...interface{}) | Returns a string with a new line at the end | +| Sprintf(format string, a ...interface{}) | Returns a string, formatted according to a format specifier | +| Sprintfln(format string, a ...interface{}) | Returns a string, formatted according to a format specifier with a new line at the end | +| Print(a ...interface{}) | Prints to the terminal | +| Println(a ...interface{}) | Prints to the terminal with a new line at the end | +| Printf(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier | +| Printfln(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier with a new line at the end | ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md) diff --git a/docs/docs/printer/header.md b/docs/docs/printer/header.md index 26a2b31ba..df85cb3c6 100644 --- a/docs/docs/printer/header.md +++ b/docs/docs/printer/header.md @@ -1,6 +1,6 @@ # HeaderPrinter - @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

(Show source of demo)

- ## Usage ### Basic usage @@ -29,28 +28,29 @@ pterm.DefaultHeader.Println("Hello, World!") > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[BackgroundStyle](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithBackgroundStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[FullWidth](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithFullWidth)|...bool| -|[Margin](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithMargin)|int| -|[TextStyle](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithTextStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| - +| Option | Type | +| ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | +| [BackgroundStyle](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithBackgroundStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [FullWidth](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithFullWidth) | ...bool | +| [Margin](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithMargin) | int | +| [TextStyle](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithTextStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#BigTextPrinter.WithWriter) | io.Writer | ### Output functions > This printer implements the interface [`TextPrinter`](https://github.com/pterm/pterm/blob/master/interface_text_printer.go) -|Function|Description| -|------|---------| -|Sprint(a ...interface{})|Returns a string| -|Sprintln(a ...interface{})|Returns a string with a new line at the end| -|Sprintf(format string, a ...interface{})|Returns a string, formatted according to a format specifier| -|Sprintfln(format string, a ...interface{})|Returns a string, formatted according to a format specifier with a new line at the end| -|Print(a ...interface{})|Prints to the terminal| -|Println(a ...interface{})|Prints to the terminal with a new line at the end| -|Printf(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier| -|Printfln(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier with a new line at the end| +| Function | Description | +| ------------------------------------------ | -------------------------------------------------------------------------------------------- | +| Sprint(a ...interface{}) | Returns a string | +| Sprintln(a ...interface{}) | Returns a string with a new line at the end | +| Sprintf(format string, a ...interface{}) | Returns a string, formatted according to a format specifier | +| Sprintfln(format string, a ...interface{}) | Returns a string, formatted according to a format specifier with a new line at the end | +| Print(a ...interface{}) | Prints to the terminal | +| Println(a ...interface{}) | Prints to the terminal with a new line at the end | +| Printf(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier | +| Printfln(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier with a new line at the end | ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md) diff --git a/docs/docs/printer/panel.md b/docs/docs/printer/panel.md index 6e2770043..cc4132c57 100644 --- a/docs/docs/printer/panel.md +++ b/docs/docs/printer/panel.md @@ -1,6 +1,6 @@ # PanelPrinter - @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

(Show source of demo)

- ## Usage ### Basic usage @@ -36,22 +35,24 @@ _ = pterm.DefaultPanel.WithPanels(panels).Render() > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[BottomPadding](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithBottomPadding)|int| -|[BoxPrinter](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithBoxPrinter)|[BoxPrinter](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter)| -|[Padding](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithPadding)|int| -|[Panels](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithPanels)|[Panels](https://pkg.go.dev/github.com/pterm/pterm#Panels)| -|[SameColumnWidth](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithSameColumnWidth)|...bool| +| Option | Type | +| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | +| [BottomPadding](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithBottomPadding) | int | +| [BoxPrinter](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithBoxPrinter) | [BoxPrinter](https://pkg.go.dev/github.com/pterm/pterm#BoxPrinter) | +| [Padding](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithPadding) | int | +| [Panels](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithPanels) | [Panels](https://pkg.go.dev/github.com/pterm/pterm#Panels) | +| [SameColumnWidth](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithSameColumnWidth) | ...bool | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#PanelPrinter.WithWriter) | io.Writer | ### Output functions > This printer implements the interface [`RenderablePrinter`](https://github.com/pterm/pterm/blob/master/interface_renderable_printer.go) -|Function|Description| -|------|---------| -|Render()|Prints to Terminal| -|Srender()|Returns a string| +| Function | Description | +| --------- | ------------------ | +| Render() | Prints to Terminal | +| Srender() | Returns a string | ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md) diff --git a/docs/docs/printer/paragraph.md b/docs/docs/printer/paragraph.md index ee7fa07f6..cc2b1c268 100644 --- a/docs/docs/printer/paragraph.md +++ b/docs/docs/printer/paragraph.md @@ -1,6 +1,6 @@ # ParagraphPrinter - - @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

(Show source of demo)

- ## Usage ### Basic usage @@ -29,24 +28,26 @@ pterm.DefaultParagraph.Println("Hello, World!") > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[MaxWidth](https://pkg.go.dev/github.com/pterm/pterm#ParagraphPrinter.WithMaxWidth)|int| +| Option | Type | +| ----------------------------------------------------------------------------------- | --------- | +| [MaxWidth](https://pkg.go.dev/github.com/pterm/pterm#ParagraphPrinter.WithMaxWidth) | int | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#ParagraphPrinter.WithWriter) | io.Writer | ### Output functions > This printer implements the interface [`TextPrinter`](https://github.com/pterm/pterm/blob/master/interface_text_printer.go) -|Function|Description| -|------|---------| -|Sprint(a ...interface{})|Returns a string| -|Sprintln(a ...interface{})|Returns a string with a new line at the end| -|Sprintf(format string, a ...interface{})|Returns a string, formatted according to a format specifier| -|Sprintfln(format string, a ...interface{})|Returns a string, formatted according to a format specifier with a new line at the end| -|Print(a ...interface{})|Prints to the terminal| -|Println(a ...interface{})|Prints to the terminal with a new line at the end| -|Printf(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier| -|Printfln(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier with a new line at the end| +| Function | Description | +| ------------------------------------------ | -------------------------------------------------------------------------------------------- | +| Sprint(a ...interface{}) | Returns a string | +| Sprintln(a ...interface{}) | Returns a string with a new line at the end | +| Sprintf(format string, a ...interface{}) | Returns a string, formatted according to a format specifier | +| Sprintfln(format string, a ...interface{}) | Returns a string, formatted according to a format specifier with a new line at the end | +| Print(a ...interface{}) | Prints to the terminal | +| Println(a ...interface{}) | Prints to the terminal with a new line at the end | +| Printf(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier | +| Printfln(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier with a new line at the end | ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md) diff --git a/docs/docs/printer/prefix.md b/docs/docs/printer/prefix.md index f8d0381b1..6c357d17d 100644 --- a/docs/docs/printer/prefix.md +++ b/docs/docs/printer/prefix.md @@ -1,6 +1,6 @@ # PrefixPrinter - @@ -24,60 +24,63 @@ pterm.Fatal.Println("Hello, World!") // Print Fatal. ### Functions -|Function|Description| -|--------|-----------| -|[FormattedPrefix](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.GetFormattedPrefix)|Returns the Prefix as a styled text string.| -|[PrintOnError](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.PrintOnError)|Only prints if the given error is not nil.| +| Function | Description | +| --------------------------------------------------------------------------------------------- | ------------------------------------------- | +| [FormattedPrefix](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.GetFormattedPrefix) | Returns the Prefix as a styled text string. | +| [PrintOnError](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.PrintOnError) | Only prints if the given error is not nil. | ### Options > To make a copy with modified options you can use: +> > ```go -pterm.Debug.WithOptionName(option).Println("Hello, World!") -pterm.Info.WithOptionName(option).Println("Hello, World!") -pterm.Success.WithOptionName(option).Println("Hello, World!") -pterm.Warning.WithOptionName(option).Println("Hello, World!") -pterm.Error.WithOptionName(option).Println("Hello, World!") -pterm.Fatal.WithOptionName(option).Println("Hello, World!") +> pterm.Debug.WithOptionName(option).Println("Hello, World!") +> pterm.Info.WithOptionName(option).Println("Hello, World!") +> pterm.Success.WithOptionName(option).Println("Hello, World!") +> pterm.Warning.WithOptionName(option).Println("Hello, World!") +> pterm.Error.WithOptionName(option).Println("Hello, World!") +> pterm.Fatal.WithOptionName(option).Println("Hello, World!") > ``` > > To change multiple options at once, you can chain the functions: +> > ```go -pterm.Debug.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") -pterm.Info.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") -pterm.Success.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") -pterm.Warning.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") -pterm.Error.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") -pterm.Fatal.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") +> pterm.Debug.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") +> pterm.Info.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") +> pterm.Success.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") +> pterm.Warning.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") +> pterm.Error.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") +> pterm.Fatal.WithOptionName(option).WithOptionName2(option2).Println("Hello, World!") > ``` > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[Debugger](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithDebugger)|bool| -|[Fatal](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithFatal)|bool| -|[Debugger](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithDebugger)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[Prefix](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithPrefix)|[Prefix](https://pkg.go.dev/github.com/pterm/pterm#Prefix)| -|[Scope](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithPrefix)|[Scope](https://pkg.go.dev/github.com/pterm/pterm#Scope)| -|[ShowLineNumber](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithShowLineNumber)|bool| -|[LineNumberOffset](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithLineNumberOffset)|int| +| Option | Type | +| ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- | +| [Debugger](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithDebugger) | bool | +| [Fatal](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithFatal) | bool | +| [Debugger](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithDebugger) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Prefix](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithPrefix) | [Prefix](https://pkg.go.dev/github.com/pterm/pterm#Prefix) | +| [Scope](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithPrefix) | [Scope](https://pkg.go.dev/github.com/pterm/pterm#Scope) | +| [ShowLineNumber](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithShowLineNumber) | bool | +| [LineNumberOffset](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithLineNumberOffset) | int | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#PrefixPrinter.WithWriter) | io.Writer | ### Output functions > This printer implements the interface [`TextPrinter`](https://github.com/pterm/pterm/blob/master/interface_text_printer.go) -|Function|Description| -|------|---------| -|Sprint(a ...interface{})|Returns a string| -|Sprintln(a ...interface{})|Returns a string with a new line at the end| -|Sprintf(format string, a ...interface{})|Returns a string, formatted according to a format specifier| -|Sprintfln(format string, a ...interface{})|Returns a string, formatted according to a format specifier with a new line at the end| -|Print(a ...interface{})|Prints to the terminal| -|Println(a ...interface{})|Prints to the terminal with a new line at the end| -|Printf(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier| -|Printfln(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier with a new line at the end| +| Function | Description | +| ------------------------------------------ | -------------------------------------------------------------------------------------------- | +| Sprint(a ...interface{}) | Returns a string | +| Sprintln(a ...interface{}) | Returns a string with a new line at the end | +| Sprintf(format string, a ...interface{}) | Returns a string, formatted according to a format specifier | +| Sprintfln(format string, a ...interface{}) | Returns a string, formatted according to a format specifier with a new line at the end | +| Print(a ...interface{}) | Prints to the terminal | +| Println(a ...interface{}) | Prints to the terminal with a new line at the end | +| Printf(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier | +| Printfln(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier with a new line at the end | ## Related diff --git a/docs/docs/printer/section.md b/docs/docs/printer/section.md index 1c80477fe..ba79d7013 100644 --- a/docs/docs/printer/section.md +++ b/docs/docs/printer/section.md @@ -1,6 +1,6 @@ # SectionPrinter - @@ -28,28 +28,29 @@ pterm.DefaultSection.Println("Hello, World!") > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[BottomPadding](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithBottomPadding)|int| -|[IndentCharacter](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithIndentCharacter)|string| -|[Level](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithLevel)|int| -|[TopPadding](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithTopPadding)|int| -|[Style](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| +| Option | Type | +| ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | +| [BottomPadding](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithBottomPadding) | int | +| [IndentCharacter](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithIndentCharacter) | string | +| [Level](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithLevel) | int | +| [TopPadding](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithTopPadding) | int | +| [Style](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#SectionPrinter.WithWriter) | io.Writer | ### Output functions > This printer implements the interface [`TextPrinter`](https://github.com/pterm/pterm/blob/master/interface_text_printer.go) -|Function|Description| -|------|---------| -|Sprint(a ...interface{})|Returns a string| -|Sprintln(a ...interface{})|Returns a string with a new line at the end| -|Sprintf(format string, a ...interface{})|Returns a string, formatted according to a format specifier| -|Sprintfln(format string, a ...interface{})|Returns a string, formatted according to a format specifier with a new line at the end| -|Print(a ...interface{})|Prints to the terminal| -|Println(a ...interface{})|Prints to the terminal with a new line at the end| -|Printf(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier| -|Printfln(format string, a ...interface{})|Prints to the terminal, formatted according to a format specifier with a new line at the end| +| Function | Description | +| ------------------------------------------ | -------------------------------------------------------------------------------------------- | +| Sprint(a ...interface{}) | Returns a string | +| Sprintln(a ...interface{}) | Returns a string with a new line at the end | +| Sprintf(format string, a ...interface{}) | Returns a string, formatted according to a format specifier | +| Sprintfln(format string, a ...interface{}) | Returns a string, formatted according to a format specifier with a new line at the end | +| Print(a ...interface{}) | Prints to the terminal | +| Println(a ...interface{}) | Prints to the terminal with a new line at the end | +| Printf(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier | +| Printfln(format string, a ...interface{}) | Prints to the terminal, formatted according to a format specifier with a new line at the end | ## Related diff --git a/docs/docs/printer/table.md b/docs/docs/printer/table.md index 81f245e13..d8ead24be 100644 --- a/docs/docs/printer/table.md +++ b/docs/docs/printer/table.md @@ -1,6 +1,6 @@ # TablePrinter - @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

(Show source of demo)

- ## Usage ### Basic usage @@ -29,31 +28,33 @@ pterm.DefaultTable.WithHasHeader().WithData(pterm.TableData{{"Hello", "World"}}) > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[CSVReader](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithCSVReader)|*csv.Reader| -|[Data](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithData)|[][]string| -|[HasHeader](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithHasHeader)|...bool| -|[HeaderStyle](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithHeaderStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[Separator](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithSeparator)|string| -|[SeparatorStyle](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithSeparatorStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[Style](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[Boxed](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithBoxed)|...bool| -|[LeftAlignment](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithLeftAlignment)|...bool| -|[RightAlignment](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithRightAlignment)|...bool| -|[HeaderRowSeparator](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithHeaderRowSeparator)|string| -|[HeaderRowSeparatorStyle](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithHeaderRowSeparatorStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[RowSeparator](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithRowSeparator)|string| -|[RowSeparatorStyle](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithRowSeparatorStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| +| Option | Type | +| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | +| [CSVReader](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithCSVReader) | \*csv.Reader | +| [Data](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithData) | [][]string | +| [HasHeader](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithHasHeader) | ...bool | +| [HeaderStyle](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithHeaderStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Separator](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithSeparator) | string | +| [SeparatorStyle](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithSeparatorStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Style](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Boxed](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithBoxed) | ...bool | +| [LeftAlignment](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithLeftAlignment) | ...bool | +| [RightAlignment](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithRightAlignment) | ...bool | +| [HeaderRowSeparator](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithHeaderRowSeparator) | string | +| [HeaderRowSeparatorStyle](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithHeaderRowSeparatorStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [RowSeparator](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithRowSeparator) | string | +| [RowSeparatorStyle](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithRowSeparatorStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#TablePrinter.WithWriter) | io.Writer | ### Output functions > This printer implements the interface [`RenderablePrinter`](https://github.com/pterm/pterm/blob/master/interface_renderable_printer.go) -|Function|Description| -|------|---------| -|Render()|Prints to Terminal| -|Srender()|Returns a string| +| Function | Description | +| --------- | ------------------ | +| Render() | Prints to Terminal | +| Srender() | Returns a string | ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md) diff --git a/docs/docs/printer/tree.md b/docs/docs/printer/tree.md index b347b4797..44f27c1be 100644 --- a/docs/docs/printer/tree.md +++ b/docs/docs/printer/tree.md @@ -1,6 +1,6 @@ # TreePrinter - @@ -9,7 +9,6 @@ Replace all of the following strings with the current printer.

(Show source of demo)

- ## Usage ### Basic usage @@ -29,25 +28,27 @@ pterm.DefaultTree.WithRoot(pterm.NewTreeFromLeveledList(pterm.LeveledList{pterm. > [!TIP] > Click the options and types to show the documentation on _pkg.go.dev_ -|Option|Type| -|------|----| -|[HorizontalString](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithHorizontalString)|string| -|[Indent](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithIndent)|int| -|[Root](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithRoot)|[TreeNode](https://pkg.go.dev/github.com/pterm/pterm#TreeNode)| -|[TextStyle](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithTextStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[TopRightCornerString](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithTopRightCornerString)|string| -|[TopRightDownStringOngoing](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithTopRightDownStringOngoing)|string| -|[TreeStyle](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithTreeStyle)|[*Style](https://pkg.go.dev/github.com/pterm/pterm#Style)| -|[VerticalString](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithVerticalString)|string| +| Option | Type | +| ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | +| [HorizontalString](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithHorizontalString) | string | +| [Indent](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithIndent) | int | +| [Root](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithRoot) | [TreeNode](https://pkg.go.dev/github.com/pterm/pterm#TreeNode) | +| [TextStyle](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithTextStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [TopRightCornerString](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithTopRightCornerString) | string | +| [TopRightDownStringOngoing](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithTopRightDownStringOngoing) | string | +| [TreeStyle](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithTreeStyle) | [\*Style](https://pkg.go.dev/github.com/pterm/pterm#Style) | +| [VerticalString](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithVerticalString) | string | +| [Writer](https://pkg.go.dev/github.com/pterm/pterm#TreePrinter.WithWriter) | io.Writer | ### Output functions > This printer implements the interface [`RenderablePrinter`](https://github.com/pterm/pterm/blob/master/interface_renderable_printer.go) -|Function|Description| -|------|---------| -|Render()|Prints to Terminal| -|Srender()|Returns a string| +| Function | Description | +| --------- | ------------------ | +| Render() | Prints to Terminal | +| Srender() | Returns a string | ## Related -- [Override default printers](docs/customizing/override-default-printer.md) \ No newline at end of file + +- [Override default printers](docs/customizing/override-default-printer.md)