Documentation
¶
Index ¶
- func Bytes(value int64) string
- func Configure(stdout, stderr io.Writer, jsonMode, noColor bool, label string)
- func Confirm(ctx context.Context, input io.Reader, out io.Writer, label string) (bool, error)
- func CoordinatedWriter(w io.Writer) io.Writer
- func Copy(ctx context.Context, dst io.Writer, src io.Reader, opts TransferOptions) (int64, error)
- func Header(format string, a ...any)
- func Info(format string, a ...any)
- func IsTerminal(value any) bool
- func KeyValue(key string, value any)
- func ReadWithContext[T any](ctx context.Context, input io.Reader, read func(io.Reader) (T, error)) (T, error)
- func Secret(ctx context.Context, input io.Reader, out io.Writer, label, flagName string) (string, error)
- func Showing(shown int, total int64, label string)
- func StartLoading(ctx context.Context) *tracker
- func StartTracker(ctx context.Context, out io.Writer, enabled bool, labels ...string) *tracker
- func Stderr() io.Writer
- func Stdout() io.Writer
- func Success(format string, a ...any)
- func SuspendProgress() func()
- func Table(headers []string, rows [][]string) error
- func TintEnabled(value string) string
- func TintInsecure(value string) string
- func TintStatus(value string) string
- func TintYesNo(value string) string
- func UnsignedBytes(value uint64) string
- func Warning(format string, a ...any)
- func WriteError(w io.Writer, err error)
- type TransferOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTerminal ¶
func ReadWithContext ¶
func ReadWithContext[T any](ctx context.Context, input io.Reader, read func(io.Reader) (T, error)) (T, error)
Pollable files cancel in place; other blocking readers use an asynchronous read.
func Secret ¶
func Secret(ctx context.Context, input io.Reader, out io.Writer, label, flagName string) (string, error)
An empty value asks the caller to pass flagName instead.
func StartLoading ¶
func StartTracker ¶
func SuspendProgress ¶
func SuspendProgress() func()
func TintEnabled ¶
func TintInsecure ¶
func TintStatus ¶
func UnsignedBytes ¶
func WriteError ¶
Types ¶
type TransferOptions ¶
Click to show internal directories.
Click to hide internal directories.