func (c *Column) f() string {
	pad := "-"
	if c.RightJustified {
		pad = ""
	}
	return fmt.Sprintf("%%%s%dv", pad, c.Length)
}
f() returns fmt formatting, for example:

Column{Name: "Environment", Length: 14, RightJustified: false}
result => %-14v

Column{Name: "PCT", Length: 5, RightJustified: true}
result => %5v
package tabular
import (
	"fmt"
	"strings"
)
type Output struct {
	Header    string
	SubHeader string
	Format    string
}
type Table struct {
	Columns map[string]*Column
	order   *[]string
}
type Column struct {
	Name           string
	Length         int
	RightJustified bool
}
const All = "*"
func New() Table {
	return Table{
		Columns: map[string]*Column{},
		order:   &[]string{},
	}
}
func (tbl Table) Print(cols ...string) string {
	t := tbl.parse(cols...)
	fmt.Println(t.Header)
	fmt.Println(t.SubHeader)
	return t.Format
}
func (tbl Table) Parse(cols ...string) Output {
	return tbl.parse(cols...)
}
func (tbl Table) Col(shortName, fullName string, columnLength int) {
	tbl.Columns[shortName] = &Column{Name: fullName, Length: columnLength}
	tbl.appendColumn(shortName)
}
func (tbl Table) ColRJ(shortName, fullName string, columnLength int) {
	tbl.Columns[shortName] = &Column{Name: fullName, Length: columnLength, RightJustified: true}
	tbl.appendColumn(shortName)
}
func (tbl Table) appendColumn(shortName string) {
	*tbl.order = append(*tbl.order, shortName)
}
func (tbl Table) parse(cols ...string) Output {
	var header string
	var subHeader string
	var format string
	var space string
	if len(cols) == 1 && cols[0] == All {
		cols = *tbl.order
	}
	for _, c := range cols {
		cf := tbl.Columns[c].f()
		header = header + space + fmt.Sprintf(cf, tbl.Columns[c].Name)
		subHeader = subHeader + space + fmt.Sprintf(cf, r(tbl.Columns[c].Length))
		format = format + space + cf
		space = " "
	}
	return Output{
		Header:    header,
		SubHeader: subHeader,
		Format:    format + "\n",
	}
}