ui

package
v3.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ask

func Ask(s string) string

func Error

func Error(message string, err error)

func Newline

func Newline()

func Quit

func Quit()

func Say

func Say(s string)

func Success

func Success(s string)

func Term

func Term(message string, err error)

func Warning

func Warning(message 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
	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 selected to TracksMenu.selected and returns them.

Jump to

Keyboard shortcuts

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