mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 01:44:03 +03:00
21 lines
382 B
Go
21 lines
382 B
Go
|
package util
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
|
||
|
"github.com/olekukonko/tablewriter"
|
||
|
)
|
||
|
|
||
|
func NewTableWriter(w io.Writer) *tablewriter.Table {
|
||
|
table := tablewriter.NewWriter(w)
|
||
|
|
||
|
table.SetHeaderAlignment(tablewriter.ALIGN_LEFT)
|
||
|
table.SetAlignment(tablewriter.ALIGN_LEFT)
|
||
|
table.SetBorder(false)
|
||
|
table.SetRowSeparator("")
|
||
|
table.SetColumnSeparator("")
|
||
|
table.SetCenterSeparator("")
|
||
|
|
||
|
return table
|
||
|
}
|