Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package cli implements a colored text handler suitable for command-line interfaces.

Index

Constants

This section is empty.

Variables

Colors mapping.

View Source
var Default = New(os.Stderr)

Default handler outputting to stderr.

View Source
var Strings = [...]string{
	logg.LevelTrace: "•",
	logg.LevelDebug: "•",
	logg.LevelInfo:  "•",
	logg.LevelWarn:  "•",
	logg.LevelError: "⨯",
}

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) HandleLog

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

HandleLog implements logg.Handler.

Jump to

Keyboard shortcuts

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