Utilities to prettify console output of tables, lists, progress-bars, text, etc.

Overview

go-pretty

Go Reference Build Status Coverage Status Go Report Card

Utilities to prettify console output of tables, lists, progress-bars, text, etc.

Table

Pretty-print tables into ASCII/Unicode strings.

+-----+------------+-----------+--------+-----------------------------+
|   # | FIRST NAME | LAST NAME | SALARY |                             |
+-----+------------+-----------+--------+-----------------------------+
|   1 | Arya       | Stark     |   3000 |                             |
|  20 | Jon        | Snow      |   2000 | You know nothing, Jon Snow! |
| 300 | Tyrion     | Lannister |   5000 |                             |
+-----+------------+-----------+--------+-----------------------------+
|     |            | TOTAL     |  10000 |                             |
+-----+------------+-----------+--------+-----------------------------+

More details can be found here: table/

List

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

 ■ Game Of Thrones
   ■ Winter
   ■ Is
   ■ Coming
     ■ This
     ■ Is
     ■ Known
 ■ The Dark Tower
   ■ The Gunslinger

More details can be found here: list/

Progress

Track the Progress of one or more Tasks (like downloading multiple files in parallel).

Sample Progress Tracking:

Calculating Total   #  1 ... done! [3.25K in 100ms]
Calculating Total   #  2 ... done! [6.50K in 100ms]
Downloading File    #  3 ... done! [9.75KB in 100ms]
Transferring Amount #  4 ... done! [$26.00K in 200ms]
Transferring Amount #  5 ... done! [£32.50K in 201ms]
Downloading File    #  6 ... done! [58.50KB in 300ms]
Calculating Total   #  7 ... done! [91.00K in 400ms]
Transferring Amount #  8 ... 60.9% (●●●●●●●●●●●●●●◌◌◌◌◌◌◌◌◌) [$78.00K in 399.071ms]
Downloading File    #  9 ... 32.1% (●●●●●●●○◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌) [58.50KB in 298.947ms]
Transferring Amount # 10 ... 13.0% (●●○◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌) [£32.50K in 198.84ms]

More details can be found here: progress/

Text

Utility functions to manipulate text with or without ANSI escape sequences. Most of the functions available are used in one or more of the other packages here.

The unit-tests for each of the above show how these can be used. There GoDoc should also have examples for all the available functions.

Benchmarks

Partial output of make bench on CI:

BenchmarkList_Render-2            	  372352	      3179 ns/op	     856 B/op	      38 allocs/op
BenchmarkProgress_Render-2        	       4	 300318682 ns/op	    3438 B/op	      87 allocs/op
BenchmarkTable_Render-2           	   27208	     44154 ns/op	    5616 B/op	     179 allocs/op
BenchmarkTable_RenderCSV-2        	  108732	     11059 ns/op	    2624 B/op	      46 allocs/op
BenchmarkTable_RenderHTML-2       	   88633	     13425 ns/op	    4080 B/op	      45 allocs/op
BenchmarkTable_RenderMarkdown-2   	  107420	     10991 ns/op	    2560 B/op	      44 allocs/op

v6.0.0++

If you are using a version of this library older than v6.0.0 and want to move to a newer version of this library, you'd have to modify the import paths from something like:

    "github.com/jedib0t/go-pretty/list"
    "github.com/jedib0t/go-pretty/progress"
    "github.com/jedib0t/go-pretty/table"
    "github.com/jedib0t/go-pretty/text"

to:

    "github.com/jedib0t/go-pretty/v6/list"
    "github.com/jedib0t/go-pretty/v6/progress"
    "github.com/jedib0t/go-pretty/v6/table"
    "github.com/jedib0t/go-pretty/v6/text"

I'd recommend you fire up your favorite IDE and do a mass search and replace for all occurrences of jedib0t/go-pretty/ to jedib0t/go-pretty/v6/. If you are on a system with access to find, grep, xargs and sed, you could just run the following from within your code folder to do the same:

find . -type f -name "*.go" | grep -v vendor | xargs sed -i 's/jedib0t\/go-pretty\//jedib0t\/go-pretty\/v6\//'g
Comments
  • Set background/foreground colors by row

    Set background/foreground colors by row

    Hi,

    Really nice package, easy to use and direct csv/html outputs are great.

    I would like to change color row, didn't see anything related. My purpose is to set a background in red if a specific = X, green if Y, etc.

    Same idea with html export, It could specify class for rows.

    Regards,

    enhancement 
    opened by Issif 24
  • Horizontally merged rows always centered

    Horizontally merged rows always centered

    At this point this isn't a bug report or feature request, but a question. I was attempting to create a summary footer row I wanted merged and aligned to the right, but it was always centered. Digging into it some more, it looks like this is the desired effect - https://github.com/jedib0t/go-pretty/blob/main/table/render.go#L86. Could you add some context as to why you override the alignment to always be centered (instead of maybe a default if unset)?

    enhancement 
    opened by jlambert121 19
  • add mutex to progress for prevent race condition

    add mutex to progress for prevent race condition

    it might not the best way to fix the race condition, but it fixed the overwritten in race condition and stable in thread safe state when many goroutine called progress render.

    opened by Haraguroicha 16
  • Question about AutoMerge option

    Question about AutoMerge option

    It is not a bug, but I have a question about generating table with auto-merge option. I wrote following code:

    package main
    
    import (
    	"fmt"
    
    	"github.com/jedib0t/go-pretty/v6/table"
    	"github.com/jedib0t/go-pretty/v6/text"
    )
    
    func main() {
    	t := table.NewWriter()
    	rowConfigAutoMerge := table.RowConfig{AutoMerge: true}
    
    	t.AppendSeparator()
    	t.Style().Title.Align = text.AlignCenter
    
    	t.AppendRow(table.Row{"No", "Text1", "Text2", "Text3", "Text4"}, rowConfigAutoMerge)
    	t.AppendSeparator()
    	t.AppendRows([]table.Row{
    		{"1", "Some Text 1", "Desctiption", "Long Text Long Text", "Long Text Long Text"},
    		{"2", "Some Text 2", "Desctiption", "Text", "Text"},
    		{"3", "Some Text 3", "Desctiption", "Text", "Text"},
    		{"4", "Some Text 4", "Desctiption", "Text", "TextB"},
    	}, rowConfigAutoMerge)
    
    	fmt.Println(t.Render())
    }
    

    which generate output table like below:

    +----+-------------+-------------+---------------------+---------------------+
    | No | Text1       | Text2       | Text3               | Text4               |
    +----+-------------+-------------+---------------------+---------------------+
    | 1  | Some Text 1 | Desctiption |            Long Text Long Text            |
    | 2  | Some Text 2 | Desctiption |                    Text                   |
    | 3  | Some Text 3 | Desctiption |                    Text                   |
    | 4  | Some Text 4 | Desctiption |                    Text                   |
    +----+-------------+-------------+-------------------------------------------+
    

    The combined width of Text3 and Text4 is equal to the sum of the widths of the largest elements in Text3 and Text4. What I want to achive is more "compact" and smaller table, like below. Is there any option to merge two (Text3 and Text4) or even more columns to get width of their sum equal to the largest element in any merged row?

    +----+-------------+-------------+----------+----------+
    | No | Text1       | Text2       | Text3    | Text4    |
    +----+-------------+-------------+----------+----------+
    | 1  | Some Text 1 | Desctiption | Long Text Long Text |
    | 2  | Some Text 2 | Desctiption |         Text        |
    | 3  | Some Text 3 | Desctiption |         Text        |
    | 4  | Some Text 4 | Desctiption |         Text        |
    +----+-------------+-------------+---------------------+
    

    I hope I explained it clearly.

    enhancement 
    opened by darbogx 13
  • Sort by time.Date

    Sort by time.Date

    Firstly, thank you for this thoughtfully implemented project! The documentation (via comments and code) are very well done and the use of library is very intuitive!

    Is your feature request related to a problem? Please describe. As the title hints, sorting by the builtin time.Time struct would be a logical additional feature to this project. I have a personal project used to translate and reconcile a my bank account against my budget app (don't ask me why they don't already). So naturally, I want the table to be printed chronologically.

    My current solution is to print an additional column for the unix (int) representation of the time and sort the table by that column. This works fine but for a table hundreds or thousands of rows long, it's a pretty ugly output. I'm functionally printing 2 time.Time columns, in different formats.

    Describe the solution you'd like An option to sort tables by time.Time values.

    Describe alternatives you've considered Defining an additional column to list unix time, then sorting that by integer values. It's ugly and requires extra, likely duplicated code. Pretty much anyone who wants to sort by date will need two columns - one for human readable time, and one for sortable time.

    Additional context Add any other context or screenshots about the feature request here.

    My project is still incomplete, but if you're interested to see how i'm consuming this project: https://github.com/copejon/reconcilitator

    Excuse the multitude of readme typos. Written late at night and not as fun to fix as coding.

    enhancement disc 
    opened by copejon 12
  • Respect separators with auto-merge

    Respect separators with auto-merge

    I am trying to build a table which shows who you are playing and also prints the board. The best I have been able to achive is the following:

    ┏━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
    ┃   ┃ MY TURN ┃ OPPONENT     ┃ LAST MOVE ┃ BOARD           ┃
    ┣━━━╋━━━━━━━━━╋━━━━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━┫
    ┃ 0 ┃ true    ┃ A.I. level 1 ┃ c2c3      ┃ ♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖ ┃
    ┃   ┃         ┃              ┃           ┃ ♙ ♙ ♙ - ♙ ♙ ♙ ♙ ┃
    ┃   ┃         ┃              ┃           ┃ - - - - - - - - ┃
    ┃   ┃         ┃              ┃           ┃ - - - ♙ - - - - ┃
    ┃   ┃         ┃              ┃           ┃ - - - - - - - - ┃
    ┃   ┃         ┃              ┃           ┃ - - ♟ ♟ - - - - ┃
    ┃   ┃         ┃              ┃           ┃ ♟ ♟ - - ♟ ♟ ♟ ♟ ┃
    ┃   ┃         ┃              ┃           ┃ ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜ ┃
    ┣━━━╋         ┃              ┣━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━┫
    ┃ 1 ┃         ┃              ┃ g8f6      ┃ ♜ ♞ ♝ ♚ ♛ ♝ - ♜ ┃
    ┃   ┃         ┃              ┃           ┃ ♟ ♟ ♟ ♟ - ♟ ♟ ♟ ┃
    ┃   ┃         ┃              ┃           ┃ - - - - - ♞ - - ┃
    ┃   ┃         ┃              ┃           ┃ - - - - ♟ - - - ┃
    ┃   ┃         ┃              ┃           ┃ - - - - ♙ - - - ┃
    ┃   ┃         ┃              ┃           ┃ - - ♘ - - - - - ┃
    ┃   ┃         ┃              ┃           ┃ ♙ ♙ ♙ ♙ - ♙ ♙ ♙ ┃
    ┃   ┃         ┃              ┃           ┃ ♖ - ♗ ♔ ♕ ♗ ♘ ♖ ┃
    ┗━━━┻━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━┛
    

    However I think it would look neater with each row. Especially with more games.

    ┏━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
    ┃   ┃ MY TURN ┃ OPPONENT     ┃ LAST MOVE ┃ BOARD           ┃
    ┣━━━╋━━━━━━━━━╋━━━━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━┫
    ┃ 0 ┃ true    ┃ A.I. level 1 ┃ c2c3      ┃ ♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖ ┃
    ┃   ┃         ┃              ┃           ┃ ♙ ♙ ♙ - ♙ ♙ ♙ ♙ ┃
    ┃   ┃         ┃              ┃           ┃ - - - - - - - - ┃
    ┃   ┃         ┃              ┃           ┃ - - - ♙ - - - - ┃
    ┃   ┃         ┃              ┃           ┃ - - - - - - - - ┃
    ┃   ┃         ┃              ┃           ┃ - - ♟ ♟ - - - - ┃
    ┃   ┃         ┃              ┃           ┃ ♟ ♟ - - ♟ ♟ ♟ ♟ ┃
    ┃   ┃         ┃              ┃           ┃ ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜ ┃
    ┣━━━╋━━━━━━━━━╋━━━━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━┫
    ┃ 1 ┃ true    ┃ A.I. level 1 ┃ g8f6      ┃ ♜ ♞ ♝ ♚ ♛ ♝ - ♜ ┃
    ┃   ┃         ┃              ┃           ┃ ♟ ♟ ♟ ♟ - ♟ ♟ ♟ ┃
    ┃   ┃         ┃              ┃           ┃ - - - - - ♞ - - ┃
    ┃   ┃         ┃              ┃           ┃ - - - - ♟ - - - ┃
    ┃   ┃         ┃              ┃           ┃ - - - - ♙ - - - ┃
    ┃   ┃         ┃              ┃           ┃ - - ♘ - - - - - ┃
    ┃   ┃         ┃              ┃           ┃ ♙ ♙ ♙ ♙ - ♙ ♙ ♙ ┃
    ┃   ┃         ┃              ┃           ┃ ♖ - ♗ ♔ ♕ ♗ ♘ ♖ ┃
    ┗━━━┻━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━┛
    

    For now I will stick with where it is at the moment, but I think it will start to look untidy if it's constantly flipping between merged and unmerged.

    Seems to me like t.AppendSeparator should break the merge, or at least this should be an option.

    Thanks

    disc 
    opened by mattcanty 11
  • Add unicode-bidi to support RTL languages

    Add unicode-bidi to support RTL languages

    Is your feature request related to a problem? Please describe. Right to Left (RTL) languages like Hebrew and Arabic don't work well with go-pretty table functionality. The order of columns doesn't map well, and the headers spacing is also not formatted.

    This picture is taken from Konsole, a terminal that supports unicode-bidi 2022-09-23_21-56

    Describe the solution you'd like I'd like the columns to show nicely as they do for English. There's built in support for unicode bidi in go: https://pkg.go.dev/golang.org/x/text/unicode/bidi

    Describe alternatives you've considered I could try to translate them from Hebrew to English, but it would result in loss of data in case the translation is not correct, so it won't work for me.

    Additional context Add any other context or screenshots about the feature request here.

    Thank you for this great tool and your time.

    enhancement 
    opened by amitlevy21 10
  • Indeterminate Progress bar

    Indeterminate Progress bar

    Is your feature request related to a problem? Please describe.

    I have a tool which performs several operations where the total is unknown. I still use a progress bar to indicate that something is happening, but it would be nice to have a mode where the progressbar indicate that its length is unknown.

    Describe the solution you'd like

    Similar to how pv works with a unknown length, it will just show the speed and have a little widget flying back'n'forth in the progress area

     [....<=>............] [34 in 3.504094s] ... Fetching ...
    

    Describe alternatives you've considered The current progressbar works, but it gives the user a sense that no progress is happening since it will always show 0%

    Additional context For reference, my needs come from having 10 parallel workers that each work on the same list of input. I have a master tracker for the total number of completed work, but I also have one for each worker - this way I can have a progressbar with a message for each piece of work currently being worked on:

    99.71% [#################.] [680 in 3.50413s] ... Total
     0.00% [..................] [34 in 3.504094s] ... Fetching aaa
     0.00% [..................] [34 in 3.504095s] ... Fetching bbb
     0.00% [..................] [34 in 3.504068s] ... Fetching ccc
     0.00% [..................] [34 in 3.50407s] ... Fetching ddd
    

    Since all workers share the same pool of work, they can't know how many they will work on in total

    enhancement 
    opened by ptxmac 9
  • Strange padding issue when rendering `%` in a column

    Strange padding issue when rendering `%` in a column

    Describe the bug Hello, I'm working on a PR in another project which is using this library: https://github.com/rocketmiles/aws-cct/pull/9

    I'm attempting to add a column which is a percent value, so I'm also adding % as part of the fmt.Sprintf call: https://github.com/rocketmiles/aws-cct/pull/9/files#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261R175

    The first issue I came across is that I seemed to need to "double escape" the percentage sign (%%%% instead of %% as I expected based on Go docs). The second is that the padding on the column seems to think that there are 2 characters added instead of one (note the border is collapsed by 1 char):

    +-------------------------------------------------+-------------+-------------+------------+---------------+
    | SERVICE                                         | 2020-09-01  | 2020-10-01  | DELTA      | DELTA PERCENT |
    +-------------------------------------------------+-------------+-------------+------------+---------------+
    | Amazon Macie                                    |       $0.00 |      $56.40 |     $56.40 |       +Inf%  |
    | Amazon Comprehend                               |       $0.00 |       $0.02 |      $0.02 |       +Inf%  |
    | Amazon EC2 Container Service                    |      $64.22 |     $151.43 |     $87.21 |      135.8%  |
    

    To Reproduce

    • Check out code from PR: https://github.com/rocketmiles/aws-cct/pull/9/files#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261R175
    • Run go build && ./aws-cct (requires valid AWS creds in your config)

    If there's nothing immediately obvious about this bug report or if you think it might be some other part of my system I can try to make a more specific reproduction.

    Expected behavior

    • Escape % normally: %% instead of %%%%
    • Table padding is calculated correctly

    Screenshots

    Software (please complete the following information):

    • OS: MacOS 10.15.7
    • go1.15.3 darwin/amd64

    Additional context None

    opened by mwarkentin 9
  • Progressbar ETA when ShowOverallTracker(false)

    Progressbar ETA when ShowOverallTracker(false)

    Is your feature request related to a problem? Please describe.

    ETA is not displayed when using pw.ShowOverallTracker(false)

    Describe the solution you'd like

    Add a ShowETA function to display the ETA when not using OverallTracker

    Thanks!

    Nicolas.

    enhancement 
    opened by nicocha30 9
  • Table Title

    Table Title

    Hi,

    Is there a way to write a title like this and all table be aligned?

    +Title-+-----+--------+-----------+------+-----------------------------+
    |      |  A  |    B   |     C     |   D  |              E              |
    +------+-----+--------+-----------+------+-----------------------------+
    | 1   |   1 | Arya   | Stark     | 3000 |                             |
    | 2   |  20 | Jon    | Snow      | 2000 | You know nothing, Jon Snow! |
    | 3   | 300 | Tyrion | Lannister | 5000 |                             |
    +------+-----+--------+-----------+------+-----------------------------+
    

    I have tried creating a new BoxStyle changing TopLeft but the first line gets bigger and the others not.

    enhancement disc 
    opened by amandahla 8
  • Custom top and bottom table style

    Custom top and bottom table style

    First, thanks for the great library. It is excellent.

    It would be nice to be able to customize the first and last rows of the table different from the middle ones.

    From what I've seen, MiddleHorizontal (t.Style().Box.MiddleHorizontal) controls the style of all horizontal lines. However, it would be nice to have independent Top and Bottom options.

    These options could generate the following tables, which I didn't get in the current settings:

       #   FIRST NAME   LAST NAME   SALARY                                  <- no top line
    ----- ------------ ----------- -------- -----------------------------
       1   Arya         Stark         3000                               
      20   Jon          Snow          2000   You know nothing, Jon Snow! 
     300   Tyrion       Lannister     5000                               
    ----- ------------ ----------- -------- -----------------------------
                        TOTAL        10000                               
    ----- ------------ ----------- -------- ----------------------------- <- with bottom line
    
    =====+============+===========+========+============================= <- diferrent styles
       # | FIRST NAME | LAST NAME | SALARY |                             
    -----+------------+-----------+--------+----------------------------- <- diferrent styles
       1 | Arya       | Stark     |   3000 |                             
      20 | Jon        | Snow      |   2000 | You know nothing, Jon Snow! 
     300 | Tyrion     | Lannister |   5000 |                             
    -----+------------+-----------+--------+-----------------------------
         |            | TOTAL     |  10000 |                             
    =====+============+===========+========+=============================
    
    ^^^^^+^^^^^^^^^^^^+^^^^^^^^^^^+^^^^^^^^+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <- diferrent styles
       # | FIRST NAME | LAST NAME | SALARY |                             
    -----+------------+-----------+--------+----------------------------- <- diferrent styles
       1 | Arya       | Stark     |   3000 |                             
      20 | Jon        | Snow      |   2000 | You know nothing, Jon Snow! 
     300 | Tyrion     | Lannister |   5000 |                             
    -----+------------+-----------+--------+-----------------------------
         |            | TOTAL     |  10000 |                             
    ~~~~~+~~~~~~~~~~~~+~~~~~~~~~~~+~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <- diferrent styles
    

    With this feature, custom styles would become more generic.

    enhancement 
    opened by manoelmozzer 3
Releases(v6.4.3)
  • v6.4.3(Nov 28, 2022)

    Bug-Fixes

    • progress
      • fix overall tracker disappearing when appending a tracker after current trackers are done (fixes #245) (thanks @iyear)
    Source code(tar.gz)
    Source code(zip)
  • v6.4.2(Nov 6, 2022)

  • v6.4.1(Nov 6, 2022)

  • v6.4.0(Oct 2, 2022)

  • v6.3.9(Sep 25, 2022)

    Features

    • table
      • option to force a text direction for tables with BiDi content (in response to https://github.com/jedib0t/go-pretty/issues/229)
        • Ex: table.Style().Format.Direction = text.LeftToRight
    Source code(tar.gz)
    Source code(zip)
  • v6.3.8(Sep 3, 2022)

  • v6.3.7(Aug 22, 2022)

    Bug-Fixes

    • table
      • do not colorize borders using row-painter output of the previous row (fixes #221)
    • text
      • provide an override method to possibly deal with width calculation issues when LANG is set to some East Asian value (addresses #220)
    Source code(tar.gz)
    Source code(zip)
  • v6.3.6(Aug 3, 2022)

  • v6.3.5(Jul 15, 2022)

  • v6.3.4(Jul 14, 2022)

  • v6.3.3(Jun 20, 2022)

    Bug-Fixes

    • text
      • deprecate text.RuneCount for being misnamed (#209)
      • introduce text.RuneWidthWithoutEscSequences as a replacement
    • dependencies
      • upgrade testify from v1.7.0 to v1.7.4 to avoid using yaml.v3 v3.0.0 (#210)
    Source code(tar.gz)
    Source code(zip)
  • v6.3.2(Jun 7, 2022)

  • v6.3.1(Apr 14, 2022)

    Features

    • progress
      • Deprecate all the Show* interfaces in progress.Progress and progress.Writer (to be removed in v7)
      • Introduce progress.Style.Visibility with same defaults as before
      • Introduce progress.Style.Visibility.ETAOverall as a new option for addressing bug #196
    Source code(tar.gz)
    Source code(zip)
  • v6.3.0(Mar 23, 2022)

  • v6.2.7(Feb 7, 2022)

  • v6.2.6(Feb 7, 2022)

  • v6.2.5(Jan 21, 2022)

    Bug-Fixes

    • progress
      • support control of notation position (#180)
    • table
      • fix rendering issues with nil values (#179)

    Misc

    • Sonar integration and fixes for some issues/smells
    • Update dependencies and go to 1.16
    • Fix some minor readability and quality issues

    Thanks @ferryvg for the bug-fixes!

    Source code(tar.gz)
    Source code(zip)
  • v6.2.4(Jul 11, 2021)

    Bug-Fixes

    • progress
      • render once before terminating to ensure one minimum render (#173)
      • improve rendering and prevent races (#174, #175)
    • table
      • fix documentation and remove bad samples (#176)

    Thanks @virtuald and @kamikazechaser!

    Source code(tar.gz)
    Source code(zip)
  • v6.2.3(Jul 7, 2021)

  • v6.2.2(May 22, 2021)

  • v6.2.1(Apr 23, 2021)

  • v6.2.0(Apr 22, 2021)

    Bug-Fixes

    • progress (lot of fixes from @virtuald again -- thanks!)
      • don't use mutex twice in ETA function (#158)
      • add incremental failure mode (#160)
      • Tracker.UpdateMessage() to safely update the tracker Message mid-way (#162)

    Misc

    • default branch is now main instead of master
    Source code(tar.gz)
    Source code(zip)
  • v6.1.1(Apr 7, 2021)

    Bug-Fixes

    • progress (lot of fixes from @virtuald)
      • simplify indeterminate indicator code (#148)
      • don't leak time.Tick channel (#152)
      • way to tell that a tracker/operation failed (#153)
      • fix incorrect mutex usages (#154)

    Misc

    • documentation fixes
    Source code(tar.gz)
    Source code(zip)
  • v6.1.0(Jan 30, 2021)

    Features

    • progress
      • Style.Chars.Indeterminate: mechanism to show progress where the end is unknown
      • Quite a few built-in styles for this, including a semi-decent Pac-Man version ;)

    Bug-Fixes

    • progress
      • plug possible race conditions due to bad mutex usage
    Source code(tar.gz)
    Source code(zip)
  • v6.0.6(Jan 20, 2021)

  • v6.0.5(Oct 1, 2020)

    Bug-Fixes

    • table
      • Title row length should match rest of the table when shorter (thanks @FoamCactus)
      • Adjust auto-index column IDs for for https://github.com/golang/go/issues/32479 (thanks @eclipseo)
    Source code(tar.gz)
    Source code(zip)
  • v6.0.4(Jun 11, 2020)

  • v6.0.3(May 27, 2020)

  • v6.0.2(May 17, 2020)

    Features

    • table
      • provide options in Style.HTML to control HTML rendering:
        • CSSClass to set the CSS class-name for the table (default: go-pretty-table)
        • EmptyColumn to control what to print for an empty column (default: &nbsp;)
        • EscapeText to control whether to invoke html.Escape on all columns (default: true)
        • Newline: to control whether \n should be replaced, and with what (default: <br/>)

    Deprecations

    table

    | Old Functionality | Replacement | | --- | --- | | SetHTMLCSSClass | Style().HTML.CSSClass |

    Source code(tar.gz)
    Source code(zip)
  • v6.0.1(May 16, 2020)

Owner
Naveen Mahalingam
Naveen Mahalingam
OTF font with vertical bars for one-line ASCII spectrum analyzers, graphs, etc

graph-bars-font OTF font with vertical bars for one-line ASCII spectrum analyzers, graphs, etc. I didn't find anything similar on the net so I decided

Andrew Dunai 18 Jul 28, 2022
Console progress bar for Golang

Terminal progress bar for Go Installation go get github.com/cheggaaa/pb/v3 Documentation for v1 bar available here Quick start package main import (

Sergey Cherepanov 3.3k Dec 3, 2022
Chalk is a Go Package which can be used for making terminal output more vibrant with text colors, text styles and background colors.

Chalk Chalk is a Go Package which can be used for making terminal output more vibrant with text colors, text styles and background colors. Documentati

null 6 Oct 29, 2022
null 0 Jan 27, 2022
Go simple progress bar writing to output

?? progress-go Go simple progress bar writing to output ?? ABOUT Contributors: Rafał Lorenz Want to contribute ? Feel free to send pull requests! Have

Rafał Lorenz 53 Oct 30, 2022
A tiny markup language for terminal output. Makes formatting output in CLI apps easier!

tml - Terminal Markup Language A Go module (and standalone binary) to make the output of coloured/formatted text in the terminal easier and more reada

Liam Galvin 703 Nov 26, 2022
Fast, realtime regex-extraction, and aggregation into common formats such as histograms, numerical summaries, tables, and more!

rare A file scanner/regex extractor and realtime summarizor. Supports various CLI-based graphing and metric formats (histogram, table, etc). Features

Chris LaPointe 173 Dec 1, 2022
A CLI tool which loads data from yaml files into the Google Cloud Spanner tables

splanter A CLI tool which loads data from yaml files into the Google Cloud Spanner tables (mainly for the development).

Yuki Ito 15 Oct 27, 2022
Project-2 - Create a project that calls service created above, pass text and prints JSON output returned from the service

Project Assignment Steps to run the project: First Download the repo present her

null 0 Jan 27, 2022
tinygo-used-files is a CLI tool that lists only the files to be built as specified by buildtag.

tinygo-used-files is a CLI tool that lists only the files to be built as specified by buildtag.

sago35 0 Feb 6, 2022
progress_bar creates a single customizable progress bar for Linux terminal.

progress_bar Go Progress Bar Features progress_bar creates a single customizable progress bar for Linux terminal. Installation go get -u github.com/er

erman imer 127 Aug 12, 2022
A really basic thread-safe progress bar for Golang applications

progressbar A very simple thread-safe progress bar which should work on every OS without problems. I needed a progressbar for croc and everything I tr

Zack 2.9k Dec 2, 2022
multi progress bar for Go cli applications

Multi Progress Bar mpb is a Go lib for rendering progress bars in terminal applications. Features Multiple Bars: Multiple progress bars are supported

Vladimir Bauer 1.9k Nov 23, 2022
Go (golang) package with 70+ configurable terminal spinner/progress indicators.

Spinner spinner is a simple package to add a spinner / progress indicator to any terminal application. Examples can be found below as well as full exa

Brian Downs 1.9k Dec 3, 2022
Print day progress in your terminal

Day progress Print day progress in your terminal Install go install github.com/tsivinsky/[email protected] Usage day-progress By default, day-progre

Daniil Tsivinsky 0 Jan 10, 2022
Golang-video-screensaver - A work in progress Microsoft Windows video screensaver implemented in Go

golang-video-screensaver A work in progress Microsoft Windows video screensaver

null 1 Sep 5, 2022
Console-based JVM monitoring tool

jvm-mon Console based JVM monitoring - when you just want to SSH into a server and see what's going on. jvm-top lets you monitor your JVM server appli

Andrejs Jermakovics 1.4k Nov 29, 2022
Disk usage analyzer with console interface written in Go

Gdu is intended primarily for SSD disks where it can fully utilize parallel processing. However HDDs work as well, but the performance gain is not so huge.

Daniel Milde 2.1k Dec 3, 2022
Integrated console application library, using Go structs as commands, with menus, completions, hints, history, Vim mode, $EDITOR usage, and more ...

Gonsole - Integrated Console Application library This package rests on a readline console library, (giving advanced completion, hint, input and histor

null 18 Nov 20, 2022