sdtab

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Truncate

func Truncate(v string, maxWidth int) string
Example
Output:

A                             B
a1                            b1
aaaaaaaaaaaaaaaaaaaaaaaa...   b
a                             bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
aaaaaaaaaaaaaaaaaaaaaaaa...   bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

Types

type T

type T[R any] struct {
	// contains filtered or unexported fields
}

func New

func New[R any](w io.Writer) *T[R]

func (*T[R]) AddHeader

func (t *T[R]) AddHeader()

func (*T[R]) AddRow

func (t *T[R]) AddRow(r R)

func (*T[R]) Flush

func (t *T[R]) Flush() error

func (*T[R]) SetTermSize

func (t *T[R]) SetTermSize(width, height int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳