Documentation ¶
Index ¶
- func MultiWriteSeeker(writeseekers ...io.WriteSeeker) io.WriteSeeker
- type CLI
- func (log *CLI) Debugf(format string, x ...interface{})
- func (log *CLI) Errorf(format string, x ...interface{})
- func (log *CLI) Format(entry *logrus.Entry) ([]byte, error)
- func (log *CLI) Infof(format string, x ...interface{})
- func (log *CLI) IsDebugEnabled() bool
- func (log *CLI) IsInfoEnabled() bool
- func (log *CLI) NewProgress(label string, units string, total int64) Progress
- func (log *CLI) Printf(format string, x ...interface{})
- func (log *CLI) Warnf(format string, x ...interface{})
- type Logger
- type Progress
- type ProgressReporter
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MultiWriteSeeker ¶
func MultiWriteSeeker(writeseekers ...io.WriteSeeker) io.WriteSeeker
MultiWriteSeeker returns a MultiWriteSeeker object
Types ¶
type CLI ¶
type CLI struct { DisableColors bool DisableTTY bool IsDebug bool IsVerbose bool // contains filtered or unexported fields }
CLI is a generic object setup for logging to terminal outputs
func (*CLI) Infof ¶
Infof is a wrapper function that executes logrus.Debugf only if verbose is enabled.
func (*CLI) IsDebugEnabled ¶
IsDebugEnabled returns whether DebugLevel logging is enabled
func (*CLI) IsInfoEnabled ¶
IsInfoEnabled returns whether InfoLevel logging is enabled
func (*CLI) NewProgress ¶
NewProgress creates a progress object and returns
type Logger ¶
type Logger interface { Debugf(format string, x ...interface{}) Errorf(format string, x ...interface{}) Infof(format string, x ...interface{}) Printf(format string, x ...interface{}) Warnf(format string, x ...interface{}) IsInfoEnabled() bool IsDebugEnabled() bool }
Logger is an interface that has the ability to hide debug/info
type Progress ¶
type Progress interface { Finish(success bool) Increment(n int64) Write(p []byte) (n int, err error) Seek(offset int64, whence int) (int64, error) ProxyReader(r io.Reader) io.ReadCloser }
Progress is an interface to display progress bars for certain operations
type ProgressReporter ¶
ProgressReporter is an interface that contains the ability to create a Progress bar object.
type View ¶
type View interface { Logger ProgressReporter }
View is an interface that contains a logger and the ability to create progress objects