state

package
v0.0.0-...-a3d2cac Latest Latest
Warning

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

Go to latest
Published: May 10, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUNNING = iota
	PAUSED  = iota
	WAITING = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback func()

type State

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

func NewState

func NewState(pattern string, w, s, l int) *State

func (*State) Decrease

func (s *State) Decrease()

func (*State) Duration

func (s *State) Duration() string

formatDuration format a duration to 12:34

func (*State) IsEnded

func (s *State) IsEnded() bool

func (*State) IsRunning

func (s *State) IsRunning() bool

func (*State) IsWaiting

func (s *State) IsWaiting() bool

func (*State) Message

func (s *State) Message() string

func (*State) Next

func (s *State) Next()

func (*State) Pause

func (s *State) Pause()

func (*State) Resume

func (s *State) Resume()

func (*State) WaitForConfirm

func (s *State) WaitForConfirm(callback Callback)

Jump to

Keyboard shortcuts

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