debug

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpacesPerIndent int = 4  // Number of spaces to use for indentation.
	LineFullLength  int = 69 // Length of debug info line.
	LineTitleLength int = 64 // Length of title segment.
)

Variables

This section is empty.

Functions

func DebugPrint

func DebugPrint(thing any, params ...any)

Print out a `Debugable` thing to standard output.

func DebugString

func DebugString(thing any, params ...any) (string, bool)

Return the string value of a `Debugable` thing.

Types

type Debug

type Debug struct {
	// contains filtered or unexported fields
}

Debug information.

func NewDebug

func NewDebug(title string) *Debug

Create a new debug object.

func (*Debug) End

func (obj *Debug) End()

Finalise the debug object.

func (*Debug) Init

func (obj *Debug) Init(params ...any)

Initialise the debug object.

func (*Debug) Print

func (obj *Debug) Print()

Print out the debug information to standard output.

func (*Debug) Printf

func (obj *Debug) Printf(format string, args ...any)

Print to the debug information.

func (*Debug) String

func (obj *Debug) String() string

Return the string representation of the debug object.

type Debugable

type Debugable interface {
	Debug(...any) *Debug
}

Abstract interface that defines whether an object is debuggable.

Jump to

Keyboard shortcuts

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