debug

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 2 Imported by: 13

README

Debug - Simple Debug Tools

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go get github.com/go-zoox/debug

Getting Started

// see test cases

License

GoZoox is released under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnvKey = "LOG_LEVEL"

EnvKey is the key of environment vars for DEBUG

View Source
var Version = "1.0.5"

Version is the version of this package.

Functions

func Debug

func Debug(args ...interface{})

Debug prints debug message if it is in debug mode

func Info

func Info(args ...interface{})

Info prints debug message if it is in debug mode

func IsDebugMode

func IsDebugMode() bool

IsDebugMode check is now in debug mode

Types

type Debugger added in v1.0.1

type Debugger interface {
	IsDebugMode(compare ...func(envValue string) bool) bool
	//
	Debug(args ...interface{})
	Info(args ...interface{})
	//
	// SetEnvKey(envKey string)
	SetLogger(func(args ...interface{}) error)
}

Debugger is a interface for debug

func New added in v1.0.1

func New(envKey string, logger ...func(args ...interface{}) error) Debugger

New returns a new Debugger

Jump to

Keyboard shortcuts

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