summarybar

package
v1.33.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package summarybar provides renderers for summary bar.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(data []Datum, opts ...Opt) progress.Renderer

New returns a summaryBarComponent configured against opts.

Types

type Datum

type Datum struct {
	Representation string
	Value          int
}

Datum is the basic unit of summary bar. Each Datum is composed of a value and a representation. The value will be represented with the representation in the rendered summary bar.

type Opt

type Opt func(*summaryBarComponent)

Opt configures an option for summaryBarComponent.

func WithEmptyRep

func WithEmptyRep(representation string) Opt

WithEmptyRep is an opt that configures the empty representation for summaryBarComponent.

func WithWidth

func WithWidth(width int) Opt

WithWidth is an opt that configures the width for summaryBarComponent.

Jump to

Keyboard shortcuts

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