Documentation
¶
Index ¶
- Constants
- func HasColorSupport() bool
- func OpenErrorStream() *os.File
- func OpenOutputStream() *os.File
- type ConsoleOutput
- func (o *ConsoleOutput) ErrorOutput() OutputInterface
- func (o *ConsoleOutput) Section() *ConsoleSectionOutput
- func (o *ConsoleOutput) SetDecorated(decorated bool)
- func (o *ConsoleOutput) SetErrorOutput(output OutputInterface)
- func (o *ConsoleOutput) SetFormatter(formatter formatter.OutputFormatterInferface)
- func (o *ConsoleOutput) SetVerbosity(verbose uint)
- type ConsoleOutputInterface
- type ConsoleSectionOutput
- func (o *ConsoleSectionOutput) AddContent(input string, newLine bool) int
- func (o *ConsoleSectionOutput) AddNewLineOfInputSubmit()
- func (o *ConsoleSectionOutput) Clear(lines int)
- func (o *ConsoleSectionOutput) Content() string
- func (o *ConsoleSectionOutput) DoWrite(message string, newLine bool)
- func (o *ConsoleSectionOutput) Overwrite(message string)
- func (o *ConsoleSectionOutput) SetMaxHeight(height int)
- func (o *ConsoleSectionOutput) VisibleContent() string
- type Output
- func (o *Output) DoWrite(message string, newLine bool)
- func (o *Output) Formatter() formatter.OutputFormatterInferface
- func (o *Output) IsDebug() bool
- func (o *Output) IsDecorated() bool
- func (o *Output) IsQuiet() bool
- func (o *Output) IsVerbose() bool
- func (o *Output) IsVeryVerbose() bool
- func (o *Output) SetDecorated(decorated bool)
- func (o *Output) SetFormatter(formatter formatter.OutputFormatterInferface)
- func (o *Output) SetVerbosity(verbosity uint)
- func (o *Output) Verbosity() uint
- func (o *Output) Write(message string, newLine bool, options uint)
- func (o *Output) WriteMany(messages []string, newLine bool, options uint)
- func (o *Output) Writeln(s string, options uint)
- func (o *Output) Writelns(s []string, options uint)
- type OutputInterface
- type Outputter
- type StreamOutput
- type TrimmedBufferOutput
Constants ¶
View Source
const ( VERBOSITY_QUIET uint = 16 VERBOSITY_NORMAL uint = 32 VERBOSITY_VERBOSE uint = 64 VERBOSITY_VERY_VERBOSE uint = 128 VERBOSITY_DEBUG uint = 256 )
View Source
const ( OUTPUT_NORMAL uint = 1 OUTPUT_RAW uint = 2 OUTPUT_PLAIN uint = 4 )
Variables ¶
This section is empty.
Functions ¶
func HasColorSupport ¶
func HasColorSupport() bool
func OpenErrorStream ¶
func OpenOutputStream ¶
Types ¶
type ConsoleOutput ¶
type ConsoleOutput struct { StreamOutput // contains filtered or unexported fields }
func NewConsoleOutput ¶
func NewConsoleOutput(verbosity uint, decorated bool, formatter formatter.OutputFormatterInferface) *ConsoleOutput
func (*ConsoleOutput) ErrorOutput ¶
func (o *ConsoleOutput) ErrorOutput() OutputInterface
func (*ConsoleOutput) Section ¶
func (o *ConsoleOutput) Section() *ConsoleSectionOutput
func (*ConsoleOutput) SetDecorated ¶
func (o *ConsoleOutput) SetDecorated(decorated bool)
func (*ConsoleOutput) SetErrorOutput ¶
func (o *ConsoleOutput) SetErrorOutput(output OutputInterface)
func (*ConsoleOutput) SetFormatter ¶
func (o *ConsoleOutput) SetFormatter(formatter formatter.OutputFormatterInferface)
func (*ConsoleOutput) SetVerbosity ¶
func (o *ConsoleOutput) SetVerbosity(verbose uint)
type ConsoleOutputInterface ¶
type ConsoleOutputInterface interface { ErrorOutput() OutputInterface SetErrorOutput(error OutputInterface) Section() ConsoleSectionOutput }
type ConsoleSectionOutput ¶
type ConsoleSectionOutput struct { StreamOutput // contains filtered or unexported fields }
func NewConsoleSectionOutput ¶
func NewConsoleSectionOutput(stream *os.File, sections []*ConsoleSectionOutput, verbosity uint, decorated bool, formatter formatter.OutputFormatterInferface) *ConsoleSectionOutput
func (*ConsoleSectionOutput) AddContent ¶
func (o *ConsoleSectionOutput) AddContent(input string, newLine bool) int
func (*ConsoleSectionOutput) AddNewLineOfInputSubmit ¶ added in v0.5.0
func (o *ConsoleSectionOutput) AddNewLineOfInputSubmit()
func (*ConsoleSectionOutput) Clear ¶
func (o *ConsoleSectionOutput) Clear(lines int)
func (*ConsoleSectionOutput) Content ¶
func (o *ConsoleSectionOutput) Content() string
func (*ConsoleSectionOutput) DoWrite ¶
func (o *ConsoleSectionOutput) DoWrite(message string, newLine bool)
func (*ConsoleSectionOutput) Overwrite ¶
func (o *ConsoleSectionOutput) Overwrite(message string)
func (*ConsoleSectionOutput) SetMaxHeight ¶
func (o *ConsoleSectionOutput) SetMaxHeight(height int)
func (*ConsoleSectionOutput) VisibleContent ¶
func (o *ConsoleSectionOutput) VisibleContent() string
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
func NewOutput ¶
func NewOutput(verbosity uint, decorated bool, f formatter.OutputFormatterInferface) *Output
func (*Output) Formatter ¶
func (o *Output) Formatter() formatter.OutputFormatterInferface
func (*Output) IsDecorated ¶
func (*Output) IsVeryVerbose ¶
func (*Output) SetDecorated ¶
func (*Output) SetFormatter ¶
func (o *Output) SetFormatter(formatter formatter.OutputFormatterInferface)
func (*Output) SetVerbosity ¶
type OutputInterface ¶
type OutputInterface interface { SetFormatter(formatter formatter.OutputFormatterInferface) Formatter() formatter.OutputFormatterInferface SetDecorated(decorated bool) IsDecorated() bool SetVerbosity(level uint) Verbosity() uint IsQuiet() bool IsVerbose() bool IsVeryVerbose() bool IsDebug() bool Writeln(message string, options uint) Writelns(messages []string, options uint) Write(message string, newLine bool, options uint) WriteMany(messages []string, newLine bool, options uint) }
type StreamOutput ¶
type StreamOutput struct { Output // contains filtered or unexported fields }
func NewStreamOutput ¶
func NewStreamOutput(stream *os.File, verbosity uint, decorated bool, formatter formatter.OutputFormatterInferface) *StreamOutput
func (*StreamOutput) Stream ¶
func (o *StreamOutput) Stream() *os.File
type TrimmedBufferOutput ¶
type TrimmedBufferOutput struct { Output // contains filtered or unexported fields }
func NewTrimmedBufferOutput ¶
func NewTrimmedBufferOutput(maxLength uint, verbosity uint, decorated bool, formatter formatter.OutputFormatterInferface) *TrimmedBufferOutput
func (*TrimmedBufferOutput) Fetch ¶
func (o *TrimmedBufferOutput) Fetch() string
Click to show internal directories.
Click to hide internal directories.