printers

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(message string) bool

Confirm prompt a confirmation message

Return true if the user entered Y/y and false if entered n/N

func DoesScriptContain added in v0.2.33

func DoesScriptContain(script store.Script, input string) bool

DoesScriptContain return true if the script contains the input value

func SelectScriptEntry added in v0.2.33

func SelectScriptEntry(scripts []store.Script, entryType string) (int, string, error)

Types

type IPrinters added in v0.2.33

type IPrinters interface {
	Confirm(message string) bool
	SelectScriptEntry(scripts []store.Script, entryType string) (int, string, error)
}

type ISpinner

type ISpinner interface {
	Message(m string)
	Clear()
	Stop()
	Start()
}

ISpinner defines a spinner interface

type Printers added in v0.2.33

type Printers struct{}

func NewPrinters added in v0.2.33

func NewPrinters() *Printers

NewPrinters returns new printers struct

func (Printers) Confirm added in v0.2.33

func (p Printers) Confirm(message string) bool

func (Printers) SelectScriptEntry added in v0.2.33

func (p Printers) SelectScriptEntry(scripts []store.Script, entryType string) (int, string, error)

SelectScriptEntry prompt a search returns the selected entry index

type Spinner

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

Spinner is a spinner object

func NewSpinner

func NewSpinner() *Spinner

NewSpinner returns a new Spinner

func (Spinner) Clear

func (s Spinner) Clear()

Clear will clear the spinner suffix

func (Spinner) Message

func (s Spinner) Message(m string)

Message will set the spinner suffix message

func (Spinner) Start

func (s Spinner) Start()

Start starts the spinner

func (Spinner) Stop

func (s Spinner) Stop()

Stop stops the spinner

Jump to

Keyboard shortcuts

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