Documentation ¶
Index ¶
- type Logger
- func (l *Logger) ColorEnabled() bool
- func (l *Logger) Error(message string)
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) SetVerbosity(verbosity log.Level)
- func (l *Logger) SetWriter(w io.Writer)
- func (l *Logger) V(level log.Level) log.InfoLogger
- func (l *Logger) Warn(message string)
- func (l *Logger) Warnf(format string, args ...interface{})
- type Result
- type Spinner
- type Status
- func (s *Status) End(output Result)
- func (s *Status) EndWithFailure(message string, a ...interface{})
- func (s *Status) EndWithSuccess(message string, a ...interface{})
- func (s *Status) EndWithWarning(message string, a ...interface{})
- func (s *Status) HasFailureMessages() bool
- func (s *Status) HasWarningMessages() bool
- func (s *Status) QueueFailureMessage(message string)
- func (s *Status) QueueSuccessMessage(message string)
- func (s *Status) QueueWarningMessage(message string)
- func (s *Status) ResultFromMessages() Result
- func (s *Status) Start(status string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is the kind cli's log.Logger implementation
func (*Logger) ColorEnabled ¶
ColorEnabled returns true if the caller is OK to write colored output
func (*Logger) SetVerbosity ¶
SetVerbosity sets the loggers verbosity
func (*Logger) V ¶
func (l *Logger) V(level log.Level) log.InfoLogger
V is part of the log.Logger interface
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner is a simple and efficient CLI loading spinner used by kind It is simplistic and assumes that the line length will not change.
func NewSpinner ¶
NewSpinner initializes and returns a new Spinner that will write to w NOTE: w should be os.Stderr or similar, and it should be a Terminal
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status is used to track ongoing status in a CLI, with a nice loading spinner when attached to a terminal
func StatusForLogger ¶
StatusForLogger returns a new status object for the logger l, if l is the kind cli logger and the writer is a Spinner, that spinner will be used for the status
func (*Status) End ¶
End completes the current status, ending any previous spinning and marking the status as success or failure
func (*Status) EndWithFailure ¶ added in v0.10.1
func (*Status) EndWithSuccess ¶ added in v0.10.1
func (*Status) EndWithWarning ¶ added in v0.10.1
func (*Status) HasFailureMessages ¶ added in v0.9.0
func (*Status) HasWarningMessages ¶ added in v0.9.0
func (*Status) QueueFailureMessage ¶
QueueFailureMessage queues up a message, which will be displayed once the status ends (using the failure format)
func (*Status) QueueSuccessMessage ¶
QueueSuccessMessage queues up a message, which will be displayed once the status ends (using the success format)
func (*Status) QueueWarningMessage ¶ added in v0.3.1
QueuewarningMessage queues up a message, which will be displayed once the status ends (using the warning format)