ui

package
v0.9.1-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HorizontalSeparator

func HorizontalSeparator(thin bool) string

func TextBox

func TextBox(text string) string

Types

type BenchmarksTableRenderer

type BenchmarksTableRenderer struct{}

BenchmarksTableRenderer implements Renderer for the Benchmark model.

func NewBenchmarksTableRenderer

func NewBenchmarksTableRenderer() *BenchmarksTableRenderer

NewBenchmarksTableRenderer creates a new instance of BenchmarksTableRenderer.

func (*BenchmarksTableRenderer) Render

func (r *BenchmarksTableRenderer) Render(benchmarks []*models.Benchmark) string

Render renders the table for a slice of benchmarks.

type Component

type Component interface {
	Render() error
}

Component is a component that can be rendered to the terminal.

type Prompt

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

Prompt is a component that renders a text input field with a prompt.

func NewPrompt

func NewPrompt(text, placeholder string, sensitive bool) *Prompt

NewPrompt returns a new Prompt component with the given text and placeholder.

func (*Prompt) Render

func (p *Prompt) Render() error

Render renders the component to the terminal.

func (*Prompt) Value

func (p *Prompt) Value() string

Value returns the value of the prompt.

func (*Prompt) WasCanceled

func (p *Prompt) WasCanceled() bool

WasCanceled returns true if the prompt was canceled.

Jump to

Keyboard shortcuts

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