func (t *Table) ColumnHeaderStyles(styles ...*Style) *Table {
	for i, style := range styles {
		if i > len(t.columns) {
			return t
		}
		t.headers[i].style = style
	}
	return t
}
ColumnHeaderStyles sets the column header styles.
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}
}
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
}
func (t *Table) Title(s string, styles ...Styler) *Table {
	var sty *Style
	switch {
	case len(styles) > 0:
		sty = Styled(styles...)
	default:
		sty = Styled(Bold)
	}
	t.title = Title{value: s, width: len(s), style: sty}
	return t
}
func (t *Table) ColumnHeaders(headers ...string) *Table {
	for i, header := range headers {
		if i >= len(t.columns) {
			return t
		}
		t.headers[i].value = header
		t.headers[i].style = Styled(Bold, Underline)
		t.headers[i].width = len(header)
	}
	return t
}