ui

package
v1.1.4-0...-f1050e0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BlueString

func BlueString(text string) string

func CyanString

func CyanString(text string) string

func Error

func Error(message string, err error)

func GreenString

func GreenString(text string) string

func MagentaString

func MagentaString(text string) string

func Newline

func Newline()

func Print

func Print(s string)

func Println

func Println(s string)

func Quit

func Quit()

func ReadInput

func ReadInput() string

func RedString

func RedString(text string) string

func Sleep

func Sleep()

func Success

func Success(s string)

func Term

func Term(message string, err error)

func Warning

func Warning(message string)

func YellowString

func YellowString(text string) string

Types

type Menu struct {
	// contains filtered or unexported fields
}
func (m *Menu) AddItems(mis ...MenuItem)
func (m *Menu) AddNewline()
func (m *Menu) Clear()
func (m Menu) Show()
type MenuItem struct {
	Index string
	Desc  string
	Run   func()
}
func (mi MenuItem) HasIndex() bool
func (mi MenuItem) IsRunnable() bool
func (mi MenuItem) String() string

type TracksMenu

type TracksMenu struct {
	GetTracks func(offset uint) ([]track.Track, error)
	Limit     uint
	Offset    uint
	// contains filtered or unexported fields
}

TracksMenu gets tracks from GetTracks function, show these tracks in menu and adds selected to TracksMenu.selected.

TracksMenu finishes when user pushes 'd' button.

func (TracksMenu) Show

func (tm TracksMenu) Show() []track.Track

Show gets tracks from GetTracks function, show these tracks, adds returns selected.

Jump to

Keyboard shortcuts

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