columnwriter

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Width int
	Lines []string
	Buf   bytes.Buffer
	Wrap  bool
}

func (*Column) Flush

func (c *Column) Flush()

func (*Column) Write

func (c *Column) Write(p []byte) (int, error)

type Writer

type Writer struct {
	Columns    []*Column
	LenFn      func(s string) int
	TruncateFn func(s string, l int) string
	// contains filtered or unexported fields
}

Writer maintins multiple column io.Writer:s. On Flush() row align them.

func New

func New(w io.Writer, widths []int) *Writer

func (*Writer) Flush

func (w *Writer) Flush() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL