termx

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Spinner = spinnerCore{
	// contains filtered or unexported fields
}

Functions

func IsInteractive

func IsInteractive() bool

func ReadPrompt added in v0.0.2

func ReadPrompt(ctx context.Context, contr Controller) (string, error)

Types

type Controller added in v0.0.2

type Controller interface {
	GetPrompt(ctx context.Context) string
	GetHint(ctx context.Context) string
}

type ControllerMode added in v0.0.2

type ControllerMode interface {
	CycleMode(ctx context.Context)
}

type MDPrinter added in v0.0.4

type MDPrinter struct {
	// contains filtered or unexported fields
}
var MD MDPrinter

func (*MDPrinter) Init added in v0.0.4

func (p *MDPrinter) Init()

func (*MDPrinter) Print added in v0.0.4

func (p *MDPrinter) Print(s string)

func (*MDPrinter) Printf added in v0.0.4

func (p *MDPrinter) Printf(format string, a ...any)

func (*MDPrinter) Println added in v0.0.4

func (p *MDPrinter) Println(a ...any)

type Static added in v0.0.2

type Static struct{ Prompt, Hint string }

func (*Static) GetHint added in v0.0.2

func (c *Static) GetHint(ctx context.Context) string

func (*Static) GetPrompt added in v0.0.2

func (c *Static) GetPrompt(ctx context.Context) string

Jump to

Keyboard shortcuts

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