debug

package
v0.0.0-...-b160839 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package debug provides a simple logging facility for debugging. Using the build tags above, you can enable/disable logging for each of the components. For example, if you want to enable logging for the parser, you can do:

go build -tags debug_parse.

The disabled versions of the functions are optimized away by the compiler, so there is no runtime overhead.

It is based on the https://github.com/lestrrat-go/pdebug package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Printf

func Printf(name, format string, args ...any)

Types

type MarkerGuard

type MarkerGuard interface {
	BindError(*error) MarkerGuard
	End()
}

func FuncMarker

func FuncMarker(prefix string) MarkerGuard

func Marker

func Marker(name, format string, args ...any) MarkerGuard

type NullMGuard

type NullMGuard struct{}

func (NullMGuard) BindError

func (g NullMGuard) BindError(_ *error) MarkerGuard

func (NullMGuard) End

func (_ NullMGuard) End()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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