Skip to content

`go-verticaltable` provides vertical `key, value` table which is separated by horizontal header line.

License

Notifications You must be signed in to change notification settings

bayashi/go-verticaltable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-verticaltable

MIT License go-verticaltable CI go-verticaltable report card Go Reference: go-verticaltable

go-verticaltable provides vertical key, value table which is separated by horizontal header line.

Usage

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
}

Installation

go get github.com/bayashi/go-verticaltable

License

MIT License

Author

Dai Okabayashi: https://github.com/bayashi

About

`go-verticaltable` provides vertical `key, value` table which is separated by horizontal header line.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages