func (t *Table) ColumnStyles(styles ...*Style) *Table {
	for i, sty := range styles {
		if i >= len(t.columns) {
			return t
		}
		t.columns[i].style = sty
	}
	return t
}
ColumnStyles sets the default styles for each column in the row except
the column headers.
package clt
import (
	"bytes"
	"fmt"
	"io"
	"log"
	"os"
	"strings"
)
type Justification int
const (
	Left Justification = iota
	Center
	Right
)
type Cell struct {
	value string
	width int
	style *Style
}
type Title struct {
	value string
	width int
	style *Style
}
type Row struct {
	cells []Cell
}
type Col struct {
	index         int
	naturalWidth  int
	computedWidth int
	wrap          bool
	style         *Style
	justify       Justification
}
type Table struct {
	title     Title
	columns   []Col
	headers   []Cell
	rows      []Row
	pad       int
	maxWidth  int
	maxHeight int
	spacing   int
	writer io.Writer
}
type TableOption func(t *Table) error
func MaxHeight(h int) TableOption {
	return func(t *Table) error {
		t.maxHeight = h
		return nil
	}
}
func MaxWidth(w int) TableOption {
	return func(t *Table) error {
		if t.maxWidth > w {
			t.maxWidth = w
		}
		return nil
	}
}
func Spacing(n int) TableOption {
	return func(t *Table) error {
		switch {
		case n > 1:
			t.spacing = n
		default:
			t.spacing = 1
		}
		return nil
	}
}
func (r *Row) addCell(c Cell) {
	r.cells = append(r.cells, c)
}
func (t *Table) AddRow(rowStrings ...string) *Table {
	newRow := Row{}
	for i, rValue := range rowStrings {
		if i >= len(t.columns) {
			break
		}
		newRow.addCell(Cell{value: rValue, width: len(rValue), style: t.columns[i].style})
	}
	for len(newRow.cells) < len(t.columns) {
		newRow.addCell(Cell{value: "", width: 0, style: Styled(Default)})
	}
	t.rows = append(t.rows, newRow)
	return t
}
func (t *Table) AddStyledRow(cells ...Cell) *Table {
	newRow := Row{}
	for i, cell1 := range cells {
		if i >= len(t.columns) {
			break
		}
		newRow.addCell(cell1)
	}
	for len(newRow.cells) < len(t.columns) {
		newRow.addCell(Cell{value: "", width: 0, style: Styled(Default)})
	}
	t.rows = append(t.rows, newRow)
	return t
}
func StyledCell(v string, sty *Style) Cell {
	return Cell{value: v, width: len(v), style: sty}
}