go-verticaltable
provides vertical key, value
table which is separated by horizontal header line.
package main
import (
"os"
"github.com/bayashi/go-verticaltable"
)
func main() {
vt := verticaltable.NewTable(os.Stdout)
vt.Header("foo")
vt.Row("ID", "123")
vt.Row("Select Type", "SIMPLE")
vt.Row("Table", "foo")
vt.Header("bar")
vt.Row("ID", "456")
vt.Row("Select Type", "UNIQUE")
vt.Row("Table", "bar")
vt.Render()
// Output:
// ********** 1. foo **********
// ID: 123
// Select Type: SIMPLE
// Table: foo
// ********** 2. bar **********
// ID: 456
// Select Type: UNIQUE
// Table: bar
}
go get github.com/bayashi/go-verticaltable
MIT License
Dai Okabayashi: https://github.com/bayashi