Documentation
¶
Index ¶
- Constants
- type Formatter
- func (f *Formatter) Bold(text string) string
- func (f *Formatter) Color(color, text string) string
- func (f *Formatter) Error(err error) error
- func (f *Formatter) ErrorText(text string) string
- func (f *Formatter) InfoText(text string) string
- func (f *Formatter) MutedText(text string) string
- func (f *Formatter) NewTable(headers ...string) *TableWriter
- func (f *Formatter) Print(v interface{}) error
- func (f *Formatter) PrintError(err error)
- func (f *Formatter) PrintJSON(v interface{}) error
- func (f *Formatter) PrintSuccess(message string)
- func (f *Formatter) Success(data interface{}) error
- func (f *Formatter) SuccessText(text string) string
- func (f *Formatter) Verbosef(format string, args ...interface{})
- func (f *Formatter) WarningText(text string) string
- type JSONResponse
- type TableWriter
Constants ¶
View Source
const ( Reset = "\033[0m" Bold = "\033[1m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Magenta = "\033[35m" Cyan = "\033[36m" Gray = "\033[90m" )
ANSI color codes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
func (*Formatter) NewTable ¶
func (f *Formatter) NewTable(headers ...string) *TableWriter
func (*Formatter) PrintError ¶
func (*Formatter) PrintSuccess ¶
func (*Formatter) SuccessText ¶
Success color (green)
func (*Formatter) WarningText ¶
Warning color (yellow)
type JSONResponse ¶
type TableWriter ¶
type TableWriter struct {
// contains filtered or unexported fields
}
func (*TableWriter) AddRow ¶
func (t *TableWriter) AddRow(values ...string)
func (*TableWriter) Flush ¶
func (t *TableWriter) Flush()
Click to show internal directories.
Click to hide internal directories.