format

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HackRobot

type HackRobot struct {
	Progress *Progress
	Robot    *Robot
}

func NewHackRobot

func NewHackRobot(w io.Writer) *HackRobot

func (*HackRobot) Error

func (h *HackRobot) Error()

Error stop progress and set error result.

func (*HackRobot) Fatal

func (h *HackRobot) Fatal(format string, args ...interface{})

Fatal prints error message to the Stderr and calls Exit(1).

func (*HackRobot) Info

func (h *HackRobot) Info(format string, args ...interface{})

Info prints information.

func (*HackRobot) Start

func (h *HackRobot) Start(format string, args ...interface{})

Start starts progress spinner and shows message with emoji.

func (*HackRobot) Success

func (h *HackRobot) Success()

End finalize robot and progress.

type Progress

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

func NewProgress

func NewProgress(w io.Writer) *Progress

func (*Progress) End

func (p *Progress) End(success bool)

func (*Progress) Start

func (p *Progress) Start(msg string)

func (*Progress) StartWithEmojiMsg

func (p *Progress) StartWithEmojiMsg(emojiMsg string)

type Robot

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

func NewRobot

func NewRobot(w io.Writer) *Robot

func (*Robot) FprintlnRed

func (r *Robot) FprintlnRed(w io.Writer, format string, args ...interface{})

FprintlnRed prints formatted line string with read arguments.

func (*Robot) PrintlnGreen

func (r *Robot) PrintlnGreen(format string, args ...interface{})

PrintlnGreen prints formatted line string with read arguments.

func (*Robot) PrintlnRed

func (r *Robot) PrintlnRed(format string, args ...interface{})

PrintlnRed prints formatted line string with read arguments.

func (*Robot) PrintlnYellow

func (r *Robot) PrintlnYellow(format string, args ...interface{})

PrintlnYellow prints formatted line string with read arguments.

func (*Robot) Printls

func (r *Robot) Printls(msg ...string)

Printls prints lines.

Jump to

Keyboard shortcuts

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