cli

package
v0.3.0-rc.2.0...-51e5094 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Colors mapping.

View Source
var Default = New(os.Stdout)

Default handler outputting to stderr.

View Source
var Strings = [...]string{
	log.DebugLevel: "•",
	log.InfoLevel:  "•",
	log.WarnLevel:  "•",
	log.ErrorLevel: "⨯",
	log.FatalLevel: "⨯",
}

Strings mapping.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Writer  io.Writer
	Padding int
	// contains filtered or unexported fields
}

Handler implementation.

func New

func New(w io.Writer) *Handler

New handler.

func (*Handler) DefaultLog

func (h *Handler) DefaultLog(e *log.Entry) error

DefaultLog is the default way of printing out logs

func (*Handler) HandleLog

func (h *Handler) HandleLog(e *log.Entry) error

HandleLog implements log.Handler.

func (*Handler) TypedLog

func (h *Handler) TypedLog(t string, e *log.Entry) error

TypedLog is used for handling special "typed" logs to the CLI

Directories

Path Synopsis
Package progress provides a simple terminal progress bar.
Package progress provides a simple terminal progress bar.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL