Documentation ¶
Index ¶
- Variables
- func CreateLogger(out io.Writer, prefix string) *log.Logger
- func CreateVerboseLogger(prefix string, verbose bool) *log.Logger
- func Debugf(msg string, args ...interface{})
- func Infof(msg string, args ...interface{})
- func PrintObject(object interface{}, format string) error
- func PrintStrings(args ...string)
- func Statusf(msg string, args ...interface{})
- func TestLogf(msg string, args ...interface{})
- func Warnf(msg string, args ...interface{})
- type IOStreams
- type StdLogger
- type TableWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var Fail = func(err error) { _, _ = fmt.Fprintf(IoStreams.ErrOut, "%s\n", err.Error()) os.Exit(1) }
View Source
var Failf = func(msg string, args ...interface{}) { _, _ = fmt.Fprintf(IoStreams.ErrOut, msg+"\n", args...) os.Exit(1) }
View Source
var IoStreams = DefaultIOStreams()
Functions ¶
func PrintObject ¶
func PrintStrings ¶
func PrintStrings(args ...string)
Types ¶
type IOStreams ¶
func DefaultIOStreams ¶
func DefaultIOStreams() IOStreams
func NewTestIOStreams ¶
func (*IOStreams) EnableDebug ¶
func (streams *IOStreams) EnableDebug()
type StdLogger ¶
type StdLogger interface { Print(v ...interface{}) Printf(format string, v ...interface{}) Println(v ...interface{}) }
StdLogger is used to log error messages.
var DebugLogger StdLogger = CreateLogger(io.Discard, "kafkactl")
var TestLogger StdLogger = CreateLogger(io.Discard, "test")
type TableWriter ¶
type TableWriter struct {
// contains filtered or unexported fields
}
func CreateTableWriter ¶
func CreateTableWriter() TableWriter
func (*TableWriter) Flush ¶
func (writer *TableWriter) Flush() error
func (*TableWriter) Initialize ¶
func (writer *TableWriter) Initialize()
func (*TableWriter) Write ¶
func (writer *TableWriter) Write(columns ...string) error
func (*TableWriter) WriteHeader ¶
func (writer *TableWriter) WriteHeader(columns ...string) error
Click to show internal directories.
Click to hide internal directories.