console

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2017 License: MIT Imports: 6 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorFnHelpLink = cc.Yellow

	ColorFnAskQuestionNote         = cc.BlackH
	ColorFnAskQuestionMain         = regularFn
	ColorFnAskQuestionDefaultValue = cc.YellowH

	ColorFnAskConfirmNote          = cc.BlackH
	ColorFnAskConfirmMain          = regularFn
	ColorFnAskConfirmDefaultAnswer = regularFn
	ColorFnAskConfirmAnswer        = regularFn

	ColorFnInfoMessage      = regularFn
	ColorFnDetailMessage    = cc.BlackH
	ColorFnSideNote         = cc.BlackH
	ColorFnSideNoteNegative = cc.Red

	ColorFnResource         = cc.Green
	ColorFnResourceNegative = cc.Red

	ColorFnErrorHeader  = cc.Red
	ColorFnErrorMessage = regularFn

	//ColorFnShellCommand = concat(cc.Bold, cc.YellowH)
	ColorFnShellCommand = cc.Cyan
	ColorFnShellOutput  = cc.BlackH
	ColorFnShellError   = cc.Red

	ColorFnMarkAdd        = cc.Green
	ColorFnMarkRemove     = cc.Red
	ColorFnMarkUpdate     = cc.BlueH
	ColorFnMarkProcessing = cc.BlueH
	ColorFnMarkQuestion   = cc.BlackH
	ColorFnMarkShell      = regularFn
)
View Source
var (
	MarkAdd        = "[+]"
	MarkRemove     = "[-]"
	MarkUpdate     = "[*]"
	MarkProcessing = "[*]"
	MarkQuestion   = ">"
	MarkShell      = ">"
)

Functions

func AddingResource

func AddingResource(message, resourceName string, mayTakeLong bool)

func AskConfirm

func AskConfirm(message string, defaultYes bool) bool

func AskConfirmWithNote

func AskConfirmWithNote(message string, defaultYes bool, note string) bool

func AskQuestion

func AskQuestion(message, defaultValue string) string

func AskQuestionWithNote

func AskQuestionWithNote(message, defaultValue, note string) string

func Blank

func Blank()

func Debug

func Debug(tokens ...string) (int, error)

func Debugf

func Debugf(format string, a ...interface{}) (int, error)

func Debugln

func Debugln(tokens ...string) (int, error)

func DetailWithResource

func DetailWithResource(message, resourceName string)

func DetailWithResourceNote

func DetailWithResourceNote(message, resourceName, note string, negative bool)

func EnableDebugf

func EnableDebugf(enable bool, prefix string)

func EnableErrorf

func EnableErrorf(enable bool)

func EnablePrintf

func EnablePrintf(enable bool)

func Error

func Error(message string)

func ExitWithError

func ExitWithError(err error) error

func ExitWithErrorString

func ExitWithErrorString(format string, a ...interface{}) error

func Info

func Info(message string)

func ProcessingOnResource

func ProcessingOnResource(message, resourceName string, mayTakeLong bool)

func RemovingResource

func RemovingResource(message, resourceName string, mayTakeLong bool)

func ShellCommand

func ShellCommand(message string)

func ShellError

func ShellError(message string)

func ShellOutput

func ShellOutput(message string)

func UpdatingResource

func UpdatingResource(message, resourceName string, mayTakeLong bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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