types

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

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

func (Option[T]) Get added in v0.13.0

func (o Option[T]) Get() (T, bool)

func (Option[T]) IsNone

func (o Option[T]) IsNone() bool

func (Option[T]) IsSome

func (o Option[T]) IsSome() bool

func (Option[T]) MustGet added in v0.13.0

func (o Option[T]) MustGet() T

func (Option[T]) Set

func (o Option[T]) Set(value T) Option[T]

type Taber

type Taber struct {
	// contains filtered or unexported fields
}

Taber is used to output lines in a tabular format.

func NewTaber

func NewTaber(linePrefix string) *Taber

NewTaber return a Taber. linePrefix sets a prefix for each line.

func (*Taber) String

func (t *Taber) String() string

func (*Taber) WriteLine

func (t *Taber) WriteLine(values ...string)

func (*Taber) Writef

func (t *Taber) Writef(fmts string, args ...any)

Writef bypasses the tabwriter and writes to the underlying buffer. Useful for setting e.g. a heading.

Jump to

Keyboard shortcuts

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