Skip to content
/ pretty Public
forked from rubrikinc/pretty

Small library for pretty-printing objects in Go

License

Notifications You must be signed in to change notification settings

noeleo/pretty

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pretty

A library for formatting and printing objects to the command line in Golang. Currently, it only has support for tables.

Licensing

This library is MIT-licensed.

Example

table, err := pretty.NewPrettyTable(
  pretty.NewColumnDef("Name"),
  pretty.NewColumnDef("Type"))
if err != nil {
	return err
}

table.SetHeader("People")

table.AddRow("Noel", "Human")
table.AddRow("David", "Cyborg")
table.AddRow("Pranava", "Crusher")

table.Print()
--------
 People |
+---------+---------+
| Name    | Type    |
+---------+---------+
|    Noel |   Human |
|   David |  Cyborg |
| Pranava | Crusher |
+---------+---------+

Testing

Run go test -vet="" -short -v ./....

Get involved

We are happy to receive bug reports, fixes, documentation enhancements, and other improvements.

Please report bugs via the github issue tracker.

Contributions will be accepted only after the execution of a Contributor License Agreement.

About

Small library for pretty-printing objects in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.1%
  • Makefile 1.9%