mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-01-28 02:19:35 +00:00
15 lines
301 B
Go
15 lines
301 B
Go
package cmd
|
|
|
|
import (
|
|
"io"
|
|
"text/tabwriter"
|
|
)
|
|
|
|
// newTabWriter returns an initialized tab Writer writes tabbed text as
|
|
// column aligned text to the given io.Writer.
|
|
func newTabWriter(writer io.Writer) *tabwriter.Writer {
|
|
tw := new(tabwriter.Writer)
|
|
tw.Init(writer, 0, 8, 1, '\t', 0)
|
|
return tw
|
|
}
|