utils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLazyValue added in v0.5.1

func GetLazyValue(x reflect.Value) reflect.Value

func ParseBrackets

func ParseBrackets(s string) (string, error)

ParseBrackets `()`

func TermWriter

func TermWriter(
	prefix string,
	useColor bool,
	prefixColor, outputColor termenv.Color,
	w io.Writer,
) io.Writer

Types

type ANSIWriter

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

ANSIWriter is a ansi escape sequence aware writer

func NewANSIWriter

func NewANSIWriter(w io.Writer, retainStyle bool) *ANSIWriter

func (*ANSIWriter) Flush

func (p *ANSIWriter) Flush() (int, error)

func (*ANSIWriter) Write

func (p *ANSIWriter) Write(data []byte) (int, error)

type ImmediateString added in v0.5.1

type ImmediateString string

func (ImmediateString) Get added in v0.5.1

func (s ImmediateString) Get() string

type LazyValue added in v0.5.1

type LazyValue interface {
	Get() string
	// contains filtered or unexported methods
}

func NewLazyValue added in v0.5.1

func NewLazyValue(create func() string) LazyValue

type LazyValueImpl added in v0.5.1

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

func (*LazyValueImpl) Get added in v0.5.1

func (v *LazyValueImpl) Get() string

type Size

type Size uint64

Size is human-readable data size in KB, MB, GB, TB, TB

Schema type is `string`

func (*Size) UnmarshalYAML

func (s *Size) UnmarshalYAML(n *yaml.Node) error

Jump to

Keyboard shortcuts

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