Documentation ¶
Index ¶
- Constants
- Variables
- func Blue(text string) string
- func Cyan(text string) string
- func Gray(text string) string
- func Green(text string) string
- func Purple(text string) string
- func Red(text string) string
- func White(text string) string
- func Yellow(text string) string
- type App
- type Command
- type Group
- type Table
Constants ¶
View Source
const ( // Success exit code. Success int = 0 // Failure exit code. Failure int = 1 )
Variables ¶
View Source
var ( // InfoLog log. InfoLog = log.New(os.Stdout, Cyan("INFO\t"), log.Ldate|log.Ltime) // ErrorLog log. ErrorLog = log.New(os.Stderr, Red("ERROR\t"), log.Ldate|log.Ltime|log.Lshortfile) )
View Source
var ( // ErrMissingArguments error. ErrMissingArguments = errors.New("cli: missing arguments") )
Functions ¶
Types ¶
type Command ¶
type Command struct { Name string Usage string Arguments []string HandleFunc func(group *Group, command *Command, arguments []string) int // contains filtered or unexported fields }
Command type.
func (*Command) PrintError ¶ added in v1.2.1
PrintError function.
Click to show internal directories.
Click to hide internal directories.