Documentation
¶
Index ¶
- Constants
- Variables
- func Blue(in string) string
- func Bold(in string) string
- func ColorHash(name string) (output string)
- func ContinueTask(input io.Reader, s string, preset, noConfirm bool) bool
- func Cyan(in string) string
- func Error(a ...interface{})
- func Errorln(a ...interface{})
- func FormatTime(i int) string
- func FormatTimeQuery(i int) string
- func GetInput(defaultValue string, noConfirm bool) (string, error)
- func Green(in string) string
- func Human(size int64) string
- func Info(a ...interface{})
- func Infoln(a ...interface{})
- func LessRunes(iRunes, jRunes []rune) bool
- func Magenta(in string) string
- func OperationInfo(a ...interface{})
- func OperationInfoln(a ...interface{})
- func PrintInfoValue(key string, values ...string)
- func Red(in string) string
- func SplitDBFromName(pkg string) (db, name string)
- func SprintError(a ...interface{}) string
- func SprintOperationInfo(a ...interface{}) string
- func SprintWarn(a ...interface{}) string
- func Warn(a ...interface{})
- func Warnln(a ...interface{})
- type ErrInputOverflow
Constants ¶
View Source
const ( CyanCode = "\x1b[36m" ResetCode = "\x1b[0m" )
Variables ¶
View Source
var UseColor = true
UseColor determines if package will emit colors.
Functions ¶
func ColorHash ¶
ColorHash Colors text using a hashing algorithm. The same text will always produce the same color while different text will produce a different color.
func ContinueTask ¶
ContinueTask prompts if user wants to continue task. If NoConfirm is set the action will continue without user input.
func FormatTime ¶
Formats a unix timestamp to ISO 8601 date (yyyy-mm-dd).
func FormatTimeQuery ¶
Formats a unix timestamp to ISO 8601 date (Mon 02 Jan 2006 03:04:05 PM MST).
func LessRunes ¶
LessRunes compares two rune values, and returns true if the first argument is lexicographicaly smaller.
func OperationInfo ¶
func OperationInfo(a ...interface{})
func OperationInfoln ¶
func OperationInfoln(a ...interface{})
func PrintInfoValue ¶
func SplitDBFromName ¶
SplitDBFromName split apart db/package to db and package.
func SprintError ¶
func SprintError(a ...interface{}) string
func SprintOperationInfo ¶
func SprintOperationInfo(a ...interface{}) string
func SprintWarn ¶
func SprintWarn(a ...interface{}) string
Types ¶
type ErrInputOverflow ¶ added in v11.1.0
type ErrInputOverflow struct{}
func (ErrInputOverflow) Error ¶ added in v11.1.0
func (e ErrInputOverflow) Error() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.