Documentation ¶
Index ¶
- Variables
- func Debug(v ...any)
- func Debugf(format string, v ...any)
- func Exit(err error)
- func Fatal(v ...any)
- func Fatalf(format string, v ...any)
- func Info(v ...any)
- func Infof(format string, v ...any)
- func NewProgressBar(index, total int64, filename string, bytes int64) *progressbar.ProgressBar
- func Warn(v ...any)
- func Warnf(format string, v ...any)
- type Printer
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultHead = []any{"Config Key", "Config Value"}
View Source
var (
EnableDebug = false // EnableDebug will enable the disabled debug log level.
)
Functions ¶
func Debug ¶
func Debug(v ...any)
Debug would print the log with in debug level. The debug was disabled by default. // You should use EnableDebug to enable it.
func Debugf ¶
Debugf would print the log with in debug level. The debug was disabled by default. You should use EnableDebug to enable it.
func Exit ¶
func Exit(err error)
Exit will print the error with fatal level and os.Exit if the error isn't nil.
func NewProgressBar ¶
NewProgressBar is used to print beautiful download progress.
Types ¶
type Printer ¶
type Printer interface { Title(title string) Printer // Title adds the table title. Head(heads ...any) Printer // Head adds the table head. Row(fields ...any) Printer // Row add a row to the table. AllowZeroValue() Printer // AllowZeroValue The row will be printed if it contains zero value. Print() // Print would print a table-like message from the given config. }
Click to show internal directories.
Click to hide internal directories.