wow: github.com/gernest/wow Index | Files | Directories

package wow

import "github.com/gernest/wow"

Index

Package Files

symbols.go wow.go

func ForceOutput Uses

func ForceOutput(w *Wow)

ForceOutput forces all output even if not not outputting directly to a terminal

type LogSymbol Uses

type LogSymbol uint

LogSymbol is a log severity level

const (
    INFO LogSymbol = iota
    SUCCESS
    WARNING
    ERROR
)

common log symbos

func (LogSymbol) String Uses

func (s LogSymbol) String() string

type Wow Uses

type Wow struct {
    IsTerminal bool
    // contains filtered or unexported fields
}

Wow writes beautiful spinners on the terminal.

func New Uses

func New(o io.Writer, s spin.Spinner, text string, options ...func(*Wow)) *Wow

New creates a new wow instance ready to start spinning.

func (*Wow) Persist Uses

func (w *Wow) Persist()

Persist writes the last character of the currect spinner frames together with the text on stdout.

A new line is added at the end to ensure the text stay that way.

func (*Wow) PersistWith Uses

func (w *Wow) PersistWith(s spin.Spinner, text string)

PersistWith writes the last frame of s together with text with a new line added to make it stick.

func (*Wow) Spinner Uses

func (w *Wow) Spinner(s spin.Spinner) *Wow

Spinner sets s to the current spinner

func (*Wow) Start Uses

func (w *Wow) Start()

Start starts the spinner. The frames are written based on the spinner interval.

func (*Wow) Stop Uses

func (w *Wow) Stop()

Stop stops the spinner

func (*Wow) Text Uses

func (w *Wow) Text(txt string) *Wow

Text adds text to the current spinner

Directories

PathSynopsis
spinDO NOT EDIT : this file was automatically generated.

Package wow imports 9 packages (graph) and is imported by 2 packages. Updated 2017-11-27. Refresh now. Tools for package owners.