Documentation ¶
Index ¶
- type Util
- func (util *Util) CheckError(err error, printUsage bool)
- func (util *Util) CheckFlags()
- func (util *Util) GetUsage() string
- func (util *Util) LogAndExit(messages ...interface{})
- func (util *Util) Pluralize(text, postfix string, times int) string
- func (util *Util) Shorten(text string, length int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Util ¶
type Util struct { Description string FlagContext flags.FlagContext Name string Version string }
Util is a configuration struct for the util
func (*Util) CheckError ¶
CheckError checks the error and if it exists, exits with exit code 1
func (*Util) CheckFlags ¶
func (util *Util) CheckFlags()
CheckFlags checks which command line flags are set
func (*Util) LogAndExit ¶
func (util *Util) LogAndExit(messages ...interface{})
LogAndExit logs one or more messages and exits with exit code 0
Click to show internal directories.
Click to hide internal directories.