Documentation
¶
Index ¶
- Constants
- Variables
- func Detached()
- func PrintTable(cols []string, nbRows int, getRow func(int) []string)
- func PrintfColor(color string, format string, args ...interface{})
- func QuitToStdErr(msg interface{})
- func QuitWithUserError(err error)
- func ReadFromTerminalYN(def string) (selected string, err error)
- func ResolvePath(origPath string, parse bool) (finalPath string, err error)
- func UsageSprintf(usages map[string][]string) string
- type Options
- type PasswordReader
- type RequiredArgs
Constants ¶
View Source
const DetachedFlag = "detached"
DetachedFlag ...
View Source
const DetachedShortFlag = "d"
DetachedShortFlag ...
View Source
const LinuxManPath = "/usr/share/man/man1/"
LinuxManPath ...
Variables ¶
View Source
var Blue = "\033[34m"
Blue ...
View Source
var Cyan = "\033[36m"
Cyan ...
View Source
var Green = "\033[32m"
Green ...
View Source
var Purple = "\033[35m"
Purple ...
View Source
var Red = "\033[31m"
Red ...
View Source
var Reset = "\033[0m"
Reset resets the color
View Source
var White = "\033[37m"
White ...
View Source
var Yellow = "\033[33m"
Yellow ...
Functions ¶
func PrintTable ¶
PrintTable ...
func PrintfColor ¶ added in v0.6.1
PrintfColor ...
func QuitToStdErr ¶
func QuitToStdErr(msg interface{})
QuitToStdErr prints an error on stderr and closes
func ReadFromTerminalYN ¶
ReadFromTerminalYN read terminal user input from a Yes No dialog. It returns y and n only with an explicit Yy or Nn input. If no input is submitted it returns default value. If the input is different from the expected one empty string is returned.
func ResolvePath ¶
ResolvePath ...
Types ¶
type Options ¶
type Options struct {
CfgFn string
}
Options cmd options
func (*Options) InitConfig ¶
InitConfig initializes config
type PasswordReader ¶
PasswordReader ...
var DefaultPasswordReader PasswordReader = new(stdinPasswordReader)
DefaultPasswordReader ...
type RequiredArgs ¶
RequiredArgs ...
Click to show internal directories.
Click to hide internal directories.