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 ¶
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()
Click to show internal directories.
Click to hide internal directories.