table/demo

package main
import "github.com/pterm/pterm"
func main() {
// Create a fork of the default table, fill it with data and print it.
// Data can also be generated and inserted later.
pterm.DefaultTable.WithHasHeader().WithData(pterm.TableData{
{"Firstname", "Lastname", "Email"},
{"Paul", "Dean", "[email protected]"},
{"Callie", "Mckay", "[email protected]"},
{"Libby", "Camacho", "[email protected]"},
}).Render()
pterm.Println() // Blank line
// Create a table with right alignment.
pterm.DefaultTable.WithHasHeader().WithData(pterm.TableData{
{"Firstname", "Lastname", "Email"},
{"Paul", "Dean", "[email protected]"},
{"Callie", "Mckay", "[email protected]"},
{"Libby", "Camacho", "[email protected]"},
}).WithRightAlignment().Render()
}