state

package
Version: v0.0.0-...-ea1f8f4 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: MIT Imports: 1 Imported by: 6

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

Duration format a duration to 12:34 (mm:ss).

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) StatusMessage

func (s *State) StatusMessage() string

StatusMessage returns a message describing the state of a session.

func (*State) WaitForConfirm

func (s *State) WaitForConfirm(callback Callback)

Source Files

Jump to

Keyboard shortcuts

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