debug

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

Package debug is used for printing debugging information and metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debugger

type Debugger interface {
	Level() Level
	Tracef(format string, v ...interface{})
	Debugf(format string, v ...interface{})
	Infof(format string, v ...interface{})
	Warnf(format string, v ...interface{})
	Errorf(format string, v ...interface{})
}

Debugger is the interface for printing debugging information.

func New

func New(level Level) Debugger

New creates a new debugger.

func NewColored

func NewColored(level Level, color *color.Color) Debugger

NewColored creates a new colored debugger.

type DebuggerSet

type DebuggerSet struct {
	Red, Green, Yellow, Blue, Magenta, Cyan, White Debugger
}

DebuggerSet is a collection of colored debuggers.

func NewSet

func NewSet(level Level) *DebuggerSet

NewSet creates a new set of colored debuggers.

type Level

type Level int

Level is the verbosity leved.

const (
	// Trace shows information in all levels.
	Trace Level = iota
	// Debug shows information in Debug, Info, Warn, and Error levels.
	Debug
	// Info shows information in Info, Warn, and Error levels.
	Info
	// Warn shows information in Warn and Error levels.
	Warn
	// Error shows information only in Error leved.
	Error
	// None does not show any information.
	None
)

Jump to

Keyboard shortcuts

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