Documentation ¶
Index ¶
- Variables
- func AskIfEmptyString(in *string, name, message, def string, debug bool)
- func ConfirmFileExists(path string, dir, yes, debug bool) bool
- func ErrPrintln(opts ...interface{})
- func ErrSprintln(opts ...interface{}) string
- func ExitPrintln(opts ...interface{})
- func FatalPrintln(opts ...interface{})
- func GetTemplateDir(output string) (string, error)
- func OkPrintln(opts ...interface{})
- func OkSprintln(opts ...interface{}) string
- type Spinner
Constants ¶
This section is empty.
Variables ¶
var ErrPrefix = color.New(color.FgRed).Sprint("»")
ErrPrefix is the prefix that should output when an error occurred
var Green = color.New(color.FgGreen)
Green is a simple green foreground color
var OkPrefix = Green.Sprint("»")
OkPrefix is the prefix that should prefix output when everything is ok
var Yellow = color.New(color.FgYellow)
Yellow is a simple yellow foreground color
Functions ¶
func AskIfEmptyString ¶
AskIfEmptyString will prompt the user if needed
func ConfirmFileExists ¶
ConfirmFileExists will prompt the user with a confirmation if the file/directory already exists If the user answers "no", the program exits properly, otherwise the function returns true if the file existed and false if it doesn't
func ErrSprintln ¶
func ErrSprintln(opts ...interface{}) string
ErrSprintln will return the string with a red prefix
func ExitPrintln ¶
func ExitPrintln(opts ...interface{})
ExitPrintln prints out information with a red prefix and exits the program with an acceptable status code
func FatalPrintln ¶
func FatalPrintln(opts ...interface{})
FatalPrintln prints out information with a red prefix and exits the program with an error status code
func GetTemplateDir ¶
GetTemplateDir creates the necessary directory or uses the one provided in the configuration on the command line
func OkSprintln ¶
func OkSprintln(opts ...interface{}) string
OkSprintln will return the string with a green prefix