utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleError

func HandleError(err error)

HandleError displays the error and stops the process if the error exists

func ShowSpinnerForFunc

func ShowSpinnerForFunc(opts SpinnerOptions, function func())

ShowSpinnerForFunc shows a spinner during the execution of the function.

func StartSpinner

func StartSpinner(opts SpinnerOptions) (spinner *spinnerPkg.Spinner)

StartSpinner creates new spinner for terminal.

func WaitForCancel

func WaitForCancel() chan os.Signal

WaitForCancel creates a chan that is resolved when the user press CTRL+C.

Types

type SpinnerOptions

type SpinnerOptions struct {
	Text  string
	Color string
}

SpinnerOptions contains all details for the spinner

Jump to

Keyboard shortcuts

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